patch-2.4.21 linux-2.4.21/fs/nfsd/vfs.c
Next file: linux-2.4.21/fs/partitions/ldm.c
Previous file: linux-2.4.21/fs/nfsd/nfsxdr.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
2003-06-13 07:51:37.000000000 -0700
- Orig file:
linux-2.4.20/fs/nfsd/vfs.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/fs/nfsd/vfs.c linux-2.4.21/fs/nfsd/vfs.c
@@ -168,11 +168,13 @@
mntput(mnt);
}
}
- /*
- * Note: we compose the file handle now, but as the
- * dentry may be negative, it may need to be updated.
- */
- err = fh_compose(resfh, exp, dentry, fhp);
+
+ if (dentry->d_inode && dentry->d_inode->i_op &&
+ dentry->d_inode->i_op->revalidate &&
+ dentry->d_inode->i_op->revalidate(dentry))
+ err = nfserr_noent;
+ else
+ err = fh_compose(resfh, exp, dentry, fhp);
if (!err && !dentry->d_inode)
err = nfserr_noent;
out:
@@ -1539,13 +1541,11 @@
inode->i_uid == current->fsuid)
return 0;
- acc &= ~ MAY_OWNER_OVERRIDE; /* This bit is no longer needed,
- and gets in the way later */
-
err = permission(inode, acc & (MAY_READ|MAY_WRITE|MAY_EXEC));
/* Allow read access to binaries even when mode 111 */
- if (err == -EACCES && S_ISREG(inode->i_mode) && acc == MAY_READ)
+ if (err == -EACCES && S_ISREG(inode->i_mode) &&
+ acc == (MAY_READ | MAY_OWNER_OVERRIDE))
err = permission(inode, MAY_EXEC);
return err? nfserrno(err) : 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)