X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfsd%2Flockd.c;h=3397bec4708558e8ffda40a12de1493e13124292;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=479835b164dee86f5567f78c923d6838c49080f0;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c index 479835b16..3397bec47 100644 --- a/fs/nfsd/lockd.c +++ b/fs/nfsd/lockd.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -22,7 +23,7 @@ * Note: we hold the dentry use count while the file is open. */ static u32 -nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file *filp) +nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp) { u32 nfserr; struct svc_fh fh; @@ -35,10 +36,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file *filp) exp_readlock(); nfserr = nfsd_open(rqstp, &fh, S_IFREG, MAY_LOCK, filp); - if (!nfserr) { - dget(filp->f_dentry); - mntget(filp->f_vfsmnt); - } fh_put(&fh); rqstp->rq_client = NULL; exp_readunlock(); @@ -60,9 +57,7 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file *filp) static void nlm_fclose(struct file *filp) { - nfsd_close(filp); - dput(filp->f_dentry); - mntput(filp->f_vfsmnt); + fput(filp); } struct nlmsvc_binding nfsd_nlm_ops = {