From c2edb305d6846ee8af7b5133845e23943d128e4c Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Mon, 29 Jun 2015 16:08:45 +0200 Subject: ext2: Handle error from dquot_initalize() dquot_initialize() can now return error. Handle it where possible. Signed-off-by: Jan Kara --- fs/ext2/inode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fs/ext2/inode.c') 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); -- cgit v1.2.3