patch-2.1.78 linux/fs/stat.c
Next file: linux/fs/sysv/inode.c
Previous file: linux/fs/smbfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 107
- Date:
Sun Jan 4 00:53:41 1998
- Orig file:
v2.1.77/linux/fs/stat.c
- Orig date:
Thu Jul 17 10:06:07 1997
diff -u --recursive --new-file v2.1.77/linux/fs/stat.c linux/fs/stat.c
@@ -20,10 +20,11 @@
* Revalidate the inode. This is required for proper NFS attribute caching.
*/
static __inline__ int
-do_revalidate(struct inode *inode)
+do_revalidate(struct dentry *dentry)
{
+ struct inode * inode = dentry->d_inode;
if (inode->i_op && inode->i_op->revalidate)
- return inode->i_op->revalidate(inode);
+ return inode->i_op->revalidate(dentry);
return 0;
}
@@ -128,10 +129,9 @@
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
- struct inode * inode = dentry->d_inode;
- error = do_revalidate(inode);
+ error = do_revalidate(dentry);
if (!error)
- error = cp_old_stat(inode, statbuf);
+ error = cp_old_stat(dentry->d_inode, statbuf);
dput(dentry);
}
@@ -150,10 +150,9 @@
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
- struct inode * inode = dentry->d_inode;
- error = do_revalidate(inode);
+ error = do_revalidate(dentry);
if (!error)
- error = cp_new_stat(inode,statbuf);
+ error = cp_new_stat(dentry->d_inode, statbuf);
dput(dentry);
}
@@ -177,10 +176,9 @@
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
- struct inode * inode = dentry->d_inode;
- error = do_revalidate(inode);
+ error = do_revalidate(dentry);
if (!error)
- error = cp_old_stat(inode, statbuf);
+ error = cp_old_stat(dentry->d_inode, statbuf);
dput(dentry);
}
@@ -200,10 +198,9 @@
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
- struct inode * inode = dentry->d_inode;
- error = do_revalidate(inode);
+ error = do_revalidate(dentry);
if (!error)
- error = cp_new_stat(inode,statbuf);
+ error = cp_new_stat(dentry->d_inode, statbuf);
dput(dentry);
}
@@ -225,11 +222,10 @@
lock_kernel();
if (fd < NR_OPEN && (f = current->files->fd[fd]) != NULL) {
struct dentry * dentry = f->f_dentry;
- struct inode * inode = dentry->d_inode;
- err = do_revalidate(inode);
+ err = do_revalidate(dentry);
if (!err)
- err = cp_old_stat(inode,statbuf);
+ err = cp_old_stat(dentry->d_inode, statbuf);
}
unlock_kernel();
return err;
@@ -245,11 +241,10 @@
lock_kernel();
if (fd < NR_OPEN && (f = current->files->fd[fd]) != NULL) {
struct dentry * dentry = f->f_dentry;
- struct inode * inode = dentry->d_inode;
- err = do_revalidate(inode);
+ err = do_revalidate(dentry);
if (!err)
- err = cp_new_stat(inode,statbuf);
+ err = cp_new_stat(dentry->d_inode, statbuf);
}
unlock_kernel();
return err;
@@ -271,9 +266,10 @@
struct inode * inode = dentry->d_inode;
error = -EINVAL;
- if (inode->i_op && inode->i_op->readlink && !(error = do_revalidate(inode))) {
+ if (inode->i_op && inode->i_op->readlink &&
+ !(error = do_revalidate(dentry))) {
UPDATE_ATIME(inode);
- error = inode->i_op->readlink(inode,buf,bufsiz);
+ error = inode->i_op->readlink(dentry, buf, bufsiz);
}
dput(dentry);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov