summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/lockd.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
commit967c65a99059fd459b956c1588ce0ba227912c4e (patch)
tree8224d013ff5d255420713d05610c7efebd204d2a /fs/nfsd/lockd.c
parente20c1cc1656a66a2773bca4591a895cbc12696ff (diff)
Merge with Linux 2.1.72, part 1.
Diffstat (limited to 'fs/nfsd/lockd.c')
-rw-r--r--fs/nfsd/lockd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
index 6e161d62b..ccca2cc7c 100644
--- a/fs/nfsd/lockd.c
+++ b/fs/nfsd/lockd.c
@@ -16,6 +16,9 @@
#define NFSDDBG_FACILITY NFSDDBG_LOCKD
+/*
+ * Note: we hold the dentry use count while the file is open.
+ */
static u32
nlm_fopen(struct svc_rqst *rqstp, struct knfs_fh *f, struct file *filp)
{
@@ -27,6 +30,8 @@ nlm_fopen(struct svc_rqst *rqstp, struct knfs_fh *f, struct file *filp)
fh.fh_dverified = 0;
nfserr = nfsd_open(rqstp, &fh, S_IFREG, 0, filp);
+ if (!nfserr)
+ dget(filp->f_dentry);
fh_put(&fh);
return nfserr;
}
@@ -35,6 +40,7 @@ static void
nlm_fclose(struct file *filp)
{
nfsd_close(filp);
+ dput(filp->f_dentry);
}
struct nlmsvc_binding nfsd_nlm_ops = {