summaryrefslogtreecommitdiff
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
authorWang Shilong <wshilong@ddn.com>2018-10-03 19:19:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-13 22:08:43 +0300
commitce1daaa84d87a633a0668307dfa279037d6e8fcd (patch)
treebd6d566e511b710cf6e0e21cd66c3a5dd6e6c484 /fs/ext4/ioctl.c
parent0d0413e92f4434b1e490f78aa8bf75f6a7122e52 (diff)
downloadlinux-ce1daaa84d87a633a0668307dfa279037d6e8fcd.tar.xz
ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR
commit 182a79e0c17147d2c2d3990a9a7b6b58a1561c7a upstream. We return most failure of dquota_initialize() except inode evict, this could make a bit sense, for example we allow file removal even quota files are broken? But it dosen't make sense to allow setting project if quota files etc are broken. Signed-off-by: Wang Shilong <wshilong@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 0b3e2486f988..0edee31913d1 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -380,7 +380,9 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
brelse(iloc.bh);
}
- dquot_initialize(inode);
+ err = dquot_initialize(inode);
+ if (err)
+ return err;
handle = ext4_journal_start(inode, EXT4_HT_QUOTA,
EXT4_QUOTA_INIT_BLOCKS(sb) +