Skip to contentSkip to conversation

affs_setattr() retval fix

PATCH In review [email protected] 2 participants 2 messages Jun 26, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/6 affs_setattr() retval fix

affs is failing to propagate the inode_setattr() return value.

---

 25-akpm/fs/affs/inode.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
fs/affs/inode.c renamed from fs/affs/inode.c~affs_setattr-retval-fix +2 -1
diff -puN fs/affs/inode.c~affs_setattr-retval-fix fs/affs/inode.c
@@ -249,7 +249,8 @@ affs_notify_change(struct dentry *dentry
 		goto out;
 	}
 
-	inode_setattr(inode, attr);
+	if (!error)
+		error = inode_setattr(inode, attr);
 	if (!error && (attr->ia_valid & ATTR_MODE))
 		mode_to_prot(inode);
 out:

_

#1 lore raw
Quoted 22 lines · On Sunday 27 June 2004 00:00, [email protected] wrote:

affs is failing to propagate the inode_setattr() return value.

---

 25-akpm/fs/affs/inode.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/affs/inode.c~affs_setattr-retval-fix fs/affs/inode.c
--- 25/fs/affs/inode.c~affs_setattr-retval-fix 2004-06-26
14:46:27.538677464 -0700 +++ 25-akpm/fs/affs/inode.c 2004-06-26
14:46:40.798661640 -0700

(quoted diff) +2 -1
@@ -249,7 +249,8 @@ affs_notify_change(struct dentry *dentry
 		goto out;
 	}
 
-	inode_setattr(inode, attr);
+	if (!error)
+		error = inode_setattr(inode, attr);
 	if (!error && (attr->ia_valid & ATTR_MODE))
 		mode_to_prot(inode);
 out:
Quoted 1 line

_

This should be enough here:

fs/affs/inode.c +1 -1
@@ -251,3 +251,3 @@
 
-	inode_setattr(inode, attr);
+	error = inode_setattr(inode, attr);
 	if (!error && (attr->ia_valid & ATTR_MODE))

Cheers,

Signature · 2 lines
Andreas Gruenbacher <[email protected]>
SUSE Labs, SUSE LINUX AG