diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-06-26 21:03:22 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-26 21:03:22 -0700 |
| commit | b56dc57880ffb177d556ed0146402d295abc38cd (patch) | |
| tree | 2f8518e8d0fe6c6d1757e1dbb789366f68af957d | |
| parent | 7a35e30c2194c7de5514a6fb1678cd2da9421843 (diff) | |
[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 <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | fs/ext2/inode.c | 4 |
1 files 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; } |
