Skip to content

Commit 9cd6681

Browse files
committed
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota and isofs fixes from Jan Kara: "Two quota fixes (fallout of the quota locking changes) and an isofs build fix" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Fix quota corruption with generic/232 test isofs: fix build regression quota: add missing lock into __dquot_transfer()
2 parents 225d3b6 + 4c6bb69 commit 9cd6681

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

fs/isofs/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,11 @@ static int isofs_show_options(struct seq_file *m, struct dentry *root)
514514
if (sbi->s_fmode != ISOFS_INVALID_MODE)
515515
seq_printf(m, ",fmode=%o", sbi->s_fmode);
516516

517+
#ifdef CONFIG_JOLIET
517518
if (sbi->s_nls_iocharset &&
518519
strcmp(sbi->s_nls_iocharset->charset, CONFIG_NLS_DEFAULT) != 0)
519520
seq_printf(m, ",iocharset=%s", sbi->s_nls_iocharset->charset);
521+
#endif
520522
return 0;
521523
}
522524

fs/quota/dquot.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,9 @@ int __dquot_transfer(struct inode *inode, struct dquot **transfer_to)
19801980
ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space, 0,
19811981
&warn_to[cnt]);
19821982
if (ret) {
1983+
spin_lock(&transfer_to[cnt]->dq_dqb_lock);
19831984
dquot_decr_inodes(transfer_to[cnt], inode_usage);
1985+
spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
19841986
goto over_quota;
19851987
}
19861988
}

fs/quota/quota_v2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,16 @@ static int v2_write_dquot(struct dquot *dquot)
328328
if (!dquot->dq_off) {
329329
alloc = true;
330330
down_write(&dqopt->dqio_sem);
331+
} else {
332+
down_read(&dqopt->dqio_sem);
331333
}
332334
ret = qtree_write_dquot(
333335
sb_dqinfo(dquot->dq_sb, dquot->dq_id.type)->dqi_priv,
334336
dquot);
335337
if (alloc)
336338
up_write(&dqopt->dqio_sem);
339+
else
340+
up_read(&dqopt->dqio_sem);
337341
return ret;
338342
}
339343

0 commit comments

Comments
 (0)