projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f439111
)
quota: remove unnecessary error code translation in dquot_quota_enable
author
Kemeng Shi
<shikemeng@huaweicloud.com>
Mon, 15 Jul 2024 13:05:34 +0000
(21:05 +0800)
committer
Jan Kara
<jack@suse.cz>
Mon, 22 Jul 2024 16:13:56 +0000
(18:13 +0200)
Simply set error code to -EEXIST when quota limit is already enabled in
dquot_quota_enable to remove unnecessary error code translation.
Link:
https://patch.msgid.link/20240715130534.2112678-5-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/dquot.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/quota/dquot.c
b/fs/quota/dquot.c
index 156bdd570ef639856c6cbec46adde8db6865c923..30496367d5814d0fb047d85b29d1c4628942ff83 100644
(file)
--- a/
fs/quota/dquot.c
+++ b/
fs/quota/dquot.c
@@
-2594,7
+2594,8
@@
static int dquot_quota_enable(struct super_block *sb, unsigned int flags)
goto out_err;
}
if (sb_has_quota_limits_enabled(sb, type)) {
- ret = -EBUSY;
+ /* compatible with XFS */
+ ret = -EEXIST;
goto out_err;
}
spin_lock(&dq_state_lock);
@@
-2608,9
+2609,6
@@
out_err:
if (flags & qtype_enforce_flag(type))
dquot_disable(sb, type, DQUOT_LIMITS_ENABLED);
}
- /* Error code translation for better compatibility with XFS */
- if (ret == -EBUSY)
- ret = -EEXIST;
return ret;
}