summaryrefslogtreecommitdiff
path: root/fs/jfs/file.c
diff options
context:
space:
mode:
authorDave Kleikamp <dave.kleikamp@oracle.com>2015-07-15 13:53:19 -0500
committerJan Kara <jack@suse.com>2015-07-23 20:59:39 +0200
commitacc84b05b1f463952a638689335ca47e70d5ea30 (patch)
tree477ad20902b4f9d3595950002d429808c1387c30 /fs/jfs/file.c
parent2e6c97ea4ce6a29941da46d03183c2c0e330fb2f (diff)
downloadlinux-next-acc84b05b1f463952a638689335ca47e70d5ea30.tar.gz
jfs: Handle error from dquot_initialize()
dquot_initialize() can now return error. Handle it where possible Slightly modified by Dave Kleikamp due to needed jfs_rename() error path fix. Signed-off-by: Jan Kara <jack@suse.com> Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs/jfs/file.c')
-rw-r--r--fs/jfs/file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index b9dc23cd04f2..0e026a7bdcd4 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -107,8 +107,11 @@ int jfs_setattr(struct dentry *dentry, struct iattr *iattr)
if (rc)
return rc;
- if (is_quota_modification(inode, iattr))
- dquot_initialize(inode);
+ if (is_quota_modification(inode, iattr)) {
+ rc = dquot_initialize(inode);
+ if (rc)
+ return rc;
+ }
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))) {
rc = dquot_transfer(inode, iattr);