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 /fs/nfsd | |
parent | 257730f99381dd26e10b832fce4c94cae7ac1176 (diff) |
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/export.c | 14 | ||||
-rw-r--r-- | fs/nfsd/lockd.c | 5 | ||||
-rw-r--r-- | fs/nfsd/nfsfh.c | 7 | ||||
-rw-r--r-- | fs/nfsd/nfssvc.c | 4 |
4 files changed, 20 insertions, 10 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 0d214eecb..e30953bb2 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -392,14 +392,15 @@ out: int exp_rootfh(struct svc_client *clp, kdev_t dev, ino_t ino, struct knfs_fh *f) { - struct svc_export *exp = NULL; - struct svc_fh fh; + struct svc_export *exp; struct dentry *dentry; struct inode *inode; + struct svc_fh fh; dprintk("nfsd: exp_rootfh(%s:%x/%ld)\n", clp->cl_ident, dev, ino); - if (!(exp = exp_get(clp, dev, ino))) + exp = exp_get(clp, dev, ino); + if (!exp) return -EPERM; dentry = exp->ex_dentry; @@ -414,8 +415,11 @@ exp_rootfh(struct svc_client *clp, kdev_t dev, ino_t ino, struct knfs_fh *f) dev, ino, inode->i_dev, inode->i_ino); } - dget(dentry); - fh_compose(&fh, exp, dentry); + /* + * fh must be initialized before calling fh_compose + */ + fh_init(&fh); + fh_compose(&fh, exp, dget(dentry)); memcpy(f, &fh.fh_handle, sizeof(struct knfs_fh)); fh_put(&fh); diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c index ccca2cc7c..e23f48e5b 100644 --- a/fs/nfsd/lockd.c +++ b/fs/nfsd/lockd.c @@ -22,12 +22,13 @@ static u32 nlm_fopen(struct svc_rqst *rqstp, struct knfs_fh *f, struct file *filp) { - struct svc_fh fh; u32 nfserr; + struct svc_fh fh; + /* must initialize before using! */ + fh_init(&fh); fh.fh_handle = *f; fh.fh_export = NULL; - fh.fh_dverified = 0; nfserr = nfsd_open(rqstp, &fh, S_IFREG, 0, filp); if (!nfserr) diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index ce89d60bf..b19fd711c 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -1107,7 +1107,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry) dprintk("nfsd: fh_compose(exp %x/%ld %s/%s, ino=%ld)\n", exp->ex_dev, exp->ex_ino, - dentry->d_parent->d_name.name, dentry->d_name.name, + parent->d_name.name, dentry->d_name.name, (inode ? inode->i_ino : 0)); /* @@ -1115,7 +1115,12 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry) * may not be done on error paths, but the cleanup must call fh_put. * Fix this soon! */ + if (fhp->fh_dverified || fhp->fh_locked || fhp->fh_dentry) { + printk(KERN_ERR "fh_compose: fh %s/%s not initialized!\n", + parent->d_name.name, dentry->d_name.name); + } fh_init(fhp); + fhp->fh_handle.fh_dcookie = dentry; if (inode) { fhp->fh_handle.fh_ino = ino_t_to_u32(inode->i_ino); diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 0164b6a7e..d8da2f463 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -36,8 +36,8 @@ #define NFSDDBG_FACILITY NFSDDBG_SVC #define NFSD_BUFSIZE (1024 + NFSSVC_MAXBLKSIZE) -#define ALLOWED_SIGS (sigmask(SIGKILL) | sigmask(SIGSTOP)) -#define SHUTDOWN_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | sigmask(SIGTERM)) +#define ALLOWED_SIGS (sigmask(SIGKILL)) +#define SHUTDOWN_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | sigmask(SIGQUIT)) extern struct svc_program nfsd_program; static void nfsd(struct svc_rqst *rqstp); |