summaryrefslogtreecommitdiff
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.com>2015-06-29 16:08:45 +0200
committerJan Kara <jack@suse.com>2015-07-23 20:59:37 +0200
commitc2edb305d6846ee8af7b5133845e23943d128e4c (patch)
treeb87a0e482f3b7d0e80bc6cd473a2cc11901a5bb6 /fs/ext2/inode.c
parent6184fc0b8dd76c6aedc7a26e93254993e14e52de (diff)
ext2: Handle error from dquot_initalize()
dquot_initialize() can now return error. Handle it where possible. Signed-off-by: Jan Kara <jack@suse.com>
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 5c09776d347f..a3a404c5df2e 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1552,8 +1552,11 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr)
if (error)
return error;
- if (is_quota_modification(inode, iattr))
- dquot_initialize(inode);
+ if (is_quota_modification(inode, iattr)) {
+ error = dquot_initialize(inode);
+ if (error)
+ return error;
+ }
if ((iattr->ia_valid & ATTR_UID && !uid_eq(iattr->ia_uid, inode->i_uid)) ||
(iattr->ia_valid & ATTR_GID && !gid_eq(iattr->ia_gid, inode->i_gid))) {
error = dquot_transfer(inode, iattr);