patch-2.1.78 linux/fs/attr.c
Next file: linux/fs/autofs/symlink.c
Previous file: linux/fs/affs/symlink.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Sun Jan 4 00:53:41 1998
- Orig file:
v2.1.77/linux/fs/attr.c
- Orig date:
Sun Dec 21 22:36:15 1997
diff -u --recursive --new-file v2.1.77/linux/fs/attr.c linux/fs/attr.c
@@ -81,8 +81,9 @@
mark_inode_dirty(inode);
}
-int notify_change(struct inode * inode, struct iattr * attr)
+int notify_change(struct dentry * dentry, struct iattr * attr)
{
+ struct inode *inode = dentry->d_inode;
int error;
time_t now = CURRENT_TIME;
unsigned int ia_valid = attr->ia_valid;
@@ -93,11 +94,13 @@
if (!(ia_valid & ATTR_MTIME_SET))
attr->ia_mtime = now;
- if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->notify_change)
- return inode->i_sb->s_op->notify_change(inode, attr);
-
- error = inode_change_ok(inode, attr);
- if (!error)
- inode_setattr(inode, attr);
+ if (inode->i_sb && inode->i_sb->s_op &&
+ inode->i_sb->s_op->notify_change)
+ error = inode->i_sb->s_op->notify_change(dentry, attr);
+ else {
+ error = inode_change_ok(inode, attr);
+ if (!error)
+ inode_setattr(inode, attr);
+ }
return error;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov