Thread (1 message) 1 message, 1 author, 2014-10-30

Re: [v5 3/5] Adds project quota support for ext4

From: Jan Kara <hidden>
Date: 2014-10-30 16:50:24
Also in: linux-ext4, linux-fsdevel

On Sun 26-10-14 13:22:51, Li Xi wrote:
This patch adds mount options for enabling/disabling project quota
accounting and enforcement. A new specific inode is also used for
project quota accounting.
  The patch looks good except for one small issue:

...
+	limit = dquot->dq_dqb.dqb_isoftlimit ?
+		dquot->dq_dqb.dqb_isoftlimit :
+		dquot->dq_dqb.dqb_ihardlimit;
+	if (limit && buf->f_files > limit) {
+		buf->f_files = limit;
+		buf->f_ffree =
+			(buf->f_files > dquot->dq_dqb.dqb_curinodes) ?
+			 (buf->f_ffree - dquot->dq_dqb.dqb_curinodes) : 0;
                              ^^^^^ here should be f_files, shouldn't it?
+	}
+
+	spin_unlock(&dq_data_lock);
+	dqput(dquot);
+	return 0;
+}
+
 static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
 	struct super_block *sb = dentry->d_sb;
								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help