patch-2.1.81 linux/include/linux/nfsd/nfsfh.h
Next file: linux/include/linux/signal.h
Previous file: linux/include/linux/msdos_fs_i.h
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Fri Jan 23 17:20:30 1998
- Orig file:
v2.1.80/linux/include/linux/nfsd/nfsfh.h
- Orig date:
Tue Jan 20 16:53:27 1998
diff -u --recursive --new-file v2.1.80/linux/include/linux/nfsd/nfsfh.h linux/include/linux/nfsd/nfsfh.h
@@ -116,12 +116,16 @@
dfprintk(FILEOP, "nfsd: fh_lock(%x/%ld) locked = %d\n",
SVCFH_DEV(fhp), SVCFH_INO(fhp), fhp->fh_locked);
*/
- if (!fhp->fh_locked) {
- down(&inode->i_sem);
- if (!fhp->fh_pre_mtime)
- fhp->fh_pre_mtime = inode->i_mtime;
- fhp->fh_locked = 1;
+ if (fhp->fh_locked) {
+ printk(KERN_WARNING "fh_lock: %s/%s already locked!\n",
+ fhp->fh_dentry->d_parent->d_name.name,
+ fhp->fh_dentry->d_name.name);
+ return;
}
+ down(&inode->i_sem);
+ if (!fhp->fh_pre_mtime)
+ fhp->fh_pre_mtime = inode->i_mtime;
+ fhp->fh_locked = 1;
}
/*
@@ -130,9 +134,8 @@
static inline void
fh_unlock(struct svc_fh *fhp)
{
- struct inode *inode = fhp->fh_dentry->d_inode;
-
if (fhp->fh_locked) {
+ struct inode *inode = fhp->fh_dentry->d_inode;
if (!fhp->fh_post_version)
fhp->fh_post_version = inode->i_version;
fhp->fh_locked = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov