2006-01-13 01:01:15

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 014 of 26] nfsd4: recovery lookup dir check


Make sure we get a directory when we look up the recovery directory.

Thanks to Christoph Hellwig for the bug report.

Based on feedback from Christoph and others, we may remove the need for
this lookup and just pass in a file descriptor from userspace instead,
and/or completely move the directory handling to userspace. For now we're
just fixing the obvious bugs.

Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4recover.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff ./fs/nfsd/nfs4recover.c~current~ ./fs/nfsd/nfs4recover.c
--- ./fs/nfsd/nfs4recover.c~current~ 2006-01-13 11:51:07.000000000 +1100
+++ ./fs/nfsd/nfs4recover.c 2006-01-13 11:51:08.000000000 +1100
@@ -399,9 +399,10 @@ nfsd4_init_recdir(char *rec_dirname)

nfs4_save_user(&uid, &gid);

- status = path_lookup(rec_dirname, LOOKUP_FOLLOW, &rec_dir);
- if (status == -ENOENT)
- printk("NFSD: recovery directory %s doesn't exist\n",
+ status = path_lookup(rec_dirname, LOOKUP_FOLLOW | LOOKUP_DIRECTORY,
+ &rec_dir);
+ if (status)
+ printk("NFSD: unable to find recovery directory %s\n",
rec_dirname);

if (!status)


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2006-01-13 09:35:30

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH kNFSd 014 of 26] nfsd4: recovery lookup dir check

On Fri, Jan 13, 2006 at 12:00:59PM +1100, NeilBrown wrote:
>
> Make sure we get a directory when we look up the recovery directory.
>
> Thanks to Christoph Hellwig for the bug report.
>
> Based on feedback from Christoph and others, we may remove the need for
> this lookup and just pass in a file descriptor from userspace instead,
> and/or completely move the directory handling to userspace. For now we're
> just fixing the obvious bugs.

So can you please work on this real fix now? It's bad enough the current
crappy state has been in mainline for so long.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs