diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-02-27 20:02:15 +0800 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-03-20 17:27:42 +0100 |
commit | f8107c996f5419a5b964b9796d736c7b81f099a0 (patch) | |
tree | 33a5add146e2d2a5eb66c92e19fe57268508269b /fs/quota/quota_v1.c | |
parent | dced733d7fa9386f7c96bbf7721360472c0aed47 (diff) |
quota: fixup *_write_file_info() to return proper error code
For v1_write_file_info function, when quota_write() returns 0,
it should be considered an EIO error. And for v2_write_file_info(),
fix to proper error return code instead of raw number.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20230227120216.31306-1-frank.li@vivo.com>
Diffstat (limited to 'fs/quota/quota_v1.c')
-rw-r--r-- | fs/quota/quota_v1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c index cd92e5fa0062..a0db3f195e95 100644 --- a/fs/quota/quota_v1.c +++ b/fs/quota/quota_v1.c @@ -206,7 +206,7 @@ static int v1_write_file_info(struct super_block *sb, int type) sizeof(struct v1_disk_dqblk), v1_dqoff(0)); if (ret == sizeof(struct v1_disk_dqblk)) ret = 0; - else if (ret > 0) + else if (ret >= 0) ret = -EIO; out: up_write(&dqopt->dqio_sem); |