diff options
author | Chengguang Xu <cgxu519@mykernel.net> | 2019-10-06 18:30:28 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-11-14 22:15:43 -0500 |
commit | ebc11f7b1f2a016a99796b0923d9c0d7b7f9cba6 (patch) | |
tree | e1e1607e2223ce96e60c6c812dfefa86594bb545 /fs | |
parent | f4c2d372b89a1e504ebb7b7eb3e29b8306479366 (diff) | |
download | linux-stable-ebc11f7b1f2a016a99796b0923d9c0d7b7f9cba6.tar.gz linux-stable-ebc11f7b1f2a016a99796b0923d9c0d7b7f9cba6.tar.bz2 linux-stable-ebc11f7b1f2a016a99796b0923d9c0d7b7f9cba6.zip |
ext4: code cleanup for get_next_id
Now the checks in ext4_get_next_id() and dquot_get_next_id()
are almost the same, so just call dquot_get_next_id() instead
of ext4_get_next_id().
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Link: https://lore.kernel.org/r/20191006103028.31299-1-cgxu519@mykernel.net
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/super.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 4e80bdee5b0f..e199850fe6f8 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1374,7 +1374,6 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, static int ext4_quota_enable(struct super_block *sb, int type, int format_id, unsigned int flags); static int ext4_enable_quotas(struct super_block *sb); -static int ext4_get_next_id(struct super_block *sb, struct kqid *qid); static struct dquot **ext4_get_dquots(struct inode *inode) { @@ -1392,7 +1391,7 @@ static const struct dquot_operations ext4_quota_operations = { .destroy_dquot = dquot_destroy, .get_projid = ext4_get_projid, .get_inode_usage = ext4_get_inode_usage, - .get_next_id = ext4_get_next_id, + .get_next_id = dquot_get_next_id, }; static const struct quotactl_ops ext4_qctl_operations = { @@ -6002,18 +6001,6 @@ out: } return len; } - -static int ext4_get_next_id(struct super_block *sb, struct kqid *qid) -{ - const struct quota_format_ops *ops; - - if (!sb_has_quota_loaded(sb, qid->type)) - return -ESRCH; - ops = sb_dqopt(sb)->ops[qid->type]; - if (!ops || !ops->get_next_id) - return -ENOSYS; - return dquot_get_next_id(sb, qid); -} #endif static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags, |