diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
commit | 03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch) | |
tree | 88db8dba75ae06ba3bad08e42c5e52efc162535c /include/linux/nfsd | |
parent | 257730f99381dd26e10b832fce4c94cae7ac1176 (diff) |
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'include/linux/nfsd')
-rw-r--r-- | include/linux/nfsd/nfsfh.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index d11d8e0c3..e33eaa418 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -110,9 +110,9 @@ void nfsd_fh_free(void); static __inline__ struct svc_fh * fh_copy(struct svc_fh *dst, struct svc_fh *src) { - if (src->fh_dverified) { + if (src->fh_dverified || src->fh_locked) { struct dentry *dentry = src->fh_dentry; - printk("fh_copy: copying %s/%s, already verified!\n", + printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n", dentry->d_parent->d_name.name, dentry->d_name.name); } @@ -133,18 +133,24 @@ fh_init(struct svc_fh *fhp) static inline void fh_lock(struct svc_fh *fhp) { - struct inode *inode = fhp->fh_dentry->d_inode; + struct dentry *dentry = fhp->fh_dentry; + struct inode *inode; /* dfprintk(FILEOP, "nfsd: fh_lock(%x/%ld) locked = %d\n", SVCFH_DEV(fhp), SVCFH_INO(fhp), fhp->fh_locked); */ + if (!fhp->fh_dverified) { + printk(KERN_ERR "fh_lock: fh not verified!\n"); + return; + } 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); + dentry->d_parent->d_name.name, dentry->d_name.name); return; } + + inode = dentry->d_inode; down(&inode->i_sem); if (!fhp->fh_pre_mtime) fhp->fh_pre_mtime = inode->i_mtime; @@ -157,8 +163,13 @@ fh_lock(struct svc_fh *fhp) static inline void fh_unlock(struct svc_fh *fhp) { + if (!fhp->fh_dverified) + printk(KERN_ERR "fh_unlock: fh not verified!\n"); + if (fhp->fh_locked) { - struct inode *inode = fhp->fh_dentry->d_inode; + struct dentry *dentry = fhp->fh_dentry; + struct inode *inode = dentry->d_inode; + if (!fhp->fh_post_version) fhp->fh_post_version = inode->i_version; fhp->fh_locked = 0; |