summaryrefslogtreecommitdiffstats
path: root/include/linux/nfsd
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /include/linux/nfsd
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'include/linux/nfsd')
-rw-r--r--include/linux/nfsd/nfsd.h3
-rw-r--r--include/linux/nfsd/nfsfh.h19
2 files changed, 15 insertions, 7 deletions
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 4869c7ef8..d7f0851fe 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -111,6 +111,9 @@ int nfsd_statfs(struct svc_rqst *, struct svc_fh *,
int nfsd_notify_change(struct inode *, struct iattr *);
int nfsd_permission(struct svc_export *, struct dentry *, int);
+/* nfsd/nfsctl.c */
+void nfsd_modcount(struct inode *, int);
+
/*
* lockd binding
*/
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index f0577b05d..3e3410776 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -70,6 +70,8 @@ typedef struct svc_fh {
* Shorthand for dprintk()'s
*/
#define SVCFH_DENTRY(f) ((f)->fh_dentry)
+#define SVCFH_INO(f) ((f)->fh_handle.fh_ino)
+#define SVCFH_DEV(f) ((f)->fh_handle.fh_dev)
/*
* Function prototypes
@@ -114,12 +116,16 @@ fh_lock(struct svc_fh *fhp)
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;
}
/*
@@ -128,9 +134,8 @@ fh_lock(struct svc_fh *fhp)
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;