Thread (2 messages) flat view 2 messages, 2 authors, 2014-10-30

Re: [v5 1/5] Adds general codes to enforces project quota limits

From: Jan Kara <jack@suse.cz>
Date: 2014-10-30 16:05:46
Also in: linux-ext4, linux-fsdevel

On Sun 26-10-14 13:22:49, Li Xi wrote:
This patch adds support for a new quota type PRJQUOTA for project quota
enforcement. Also a new method get_projid() is added into dquot_operations
structure.

Signed-off-by: Li Xi <redacted>
Signed-off-by: Dmitry Monakhov <redacted>
...
quoted hunk ↗ jump to hunk
@@ -72,6 +76,8 @@ static int quota_quotaon(struct super_block *sb, int type, int cmd, qid_t id,
 		return sb->s_qcop->quota_on_meta(sb, type, id);
 	if (IS_ERR(path))
 		return PTR_ERR(path);
+	if (type == PRJQUOTA && sb->dq_op->get_projid == NULL)
+		return -EOPNOTSUPP;
 	return sb->s_qcop->quota_on(sb, type, id, path);
 }
  Checking for ->get_projid() in quota_quotaon() isn't necessary. This will
be already handled by allowed_qtype bitmask in my patches. But you could
add a test in vfs_load_quota_inode() just after ->quota_write and
->quota_read tests. It will be mostly a safety check but I think it's
worthwhile.

Otherwise the patch looks fine to me.

								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