[Yaffs] [PATCH] more fix for inode_setattr

Luc Van Oostenryck lkml at looxix.net
Tue Jul 19 01:38:16 BST 2005


I think that we must only call inode_setattr() if yaffs_SetAttributes() succeed.

It seems logical and it's done like this in other filesystems.
-------------- next part --------------
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -1200,7 +1200,8 @@ static int yaffs_setattr(struct dentry *
 			error = -EPERM;
 		}
 		yaffs_GrossUnlock(dev);
-		error = inode_setattr(inode,attr);
+		if (!error)
+			error = inode_setattr(inode,attr);
 	}
 	return error;
 }


More information about the yaffs mailing list