Commit b56dc578 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext2_setattr retval fix

ext2_setattr() drops the inode_setattr() return value on the floor.  This is
very bad - I/O errors during truncate are lost.

The patch changes ext2_setattr() so that we no longer call ext2_acl_chmod() if
inode_setattr(), which is what ext3 does.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7a35e30c
......@@ -1276,8 +1276,8 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr)
if (error)
return error;
}
inode_setattr(inode, iattr);
if (iattr->ia_valid & ATTR_MODE)
error = inode_setattr(inode, iattr);
if (!error && (iattr->ia_valid & ATTR_MODE))
error = ext2_acl_chmod(inode);
return error;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment