patch-2.2.18 linux/fs/lockd/svcsubs.c
Next file: linux/fs/lockd/xdr.c
Previous file: linux/fs/lockd/svcshare.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Sun Oct 15 21:15:17 2000
- Orig file:
v2.2.17/fs/lockd/svcsubs.c
- Orig date:
Fri Apr 21 12:46:43 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/fs/lockd/svcsubs.c linux/fs/lockd/svcsubs.c
@@ -13,6 +13,7 @@
#include <linux/sunrpc/clnt.h>
#include <linux/nfsd/nfsfh.h>
#include <linux/nfsd/export.h>
+#include <linux/lockd/xdr4.h>
#include <linux/lockd/lockd.h>
#include <linux/lockd/share.h>
#include <linux/lockd/sm_inter.h>
@@ -48,7 +49,7 @@
nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
struct nfs_fh *f)
{
- struct knfs_fh *fh = (struct knfs_fh *) f;
+ struct knfs_fh *fh = (struct knfs_fh *) f->data;
struct nlm_file *file;
unsigned int hash;
u32 nfserr;
@@ -69,7 +70,7 @@
dprintk("lockd: creating file for %s/%u\n",
kdevname(u32_to_kdev_t(fh->fh_dev)), fh->fh_ino);
- nfserr = nlm_lck_denied_nolocks;
+ nfserr = nlm4_lck_denied_nolocks;
file = (struct nlm_file *) kmalloc(sizeof(*file), GFP_KERNEL);
if (!file)
goto out_unlock;
@@ -104,7 +105,10 @@
out_free:
kfree(file);
- nfserr = nlm_lck_denied;
+ if (nfserr == 1)
+ nfserr = nlm4_stale_fh;
+ else
+ nfserr = nlm4_lck_denied;
goto out_unlock;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)