From b56dc57880ffb177d556ed0146402d295abc38cd Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 26 Jun 2004 21:03:22 -0700 Subject: [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: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ext2/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 769c0b3af447..454cde6adbd8 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -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; } -- cgit v1.2.3