ChangeSet 1.2231.1.184, 2005/03/28 20:07:34-08:00, [EMAIL PROTECTED]
[PATCH] fs/attr.c: fix check after use
This patch fixes a check after use found by the Coverity checker.
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
attr.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff -Nru a/fs/attr.c b/fs/attr.c
--- a/fs/attr.c 2005-03-28 21:47:13 -08:00
+++ b/fs/attr.c 2005-03-28 21:47:13 -08:00
@@ -135,13 +135,16 @@
int notify_change(struct dentry * dentry, struct iattr * attr)
{
struct inode *inode = dentry->d_inode;
- mode_t mode = inode->i_mode;
+ mode_t mode;
int error;
- struct timespec now = current_fs_time(inode->i_sb);
+ struct timespec now;
unsigned int ia_valid = attr->ia_valid;
if (!inode)
BUG();
+
+ mode = inode->i_mode;
+ now = current_fs_time(inode->i_sb);
attr->ia_ctime = now;
if (!(ia_valid & ATTR_ATIME_SET))
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html