Commit c2642ab0 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Linus Torvalds
Browse files

[PATCH] 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: default avatarJ. Bruce Fields <>
Signed-off-by: default avatarNeil Brown <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent d22749b6
......@@ -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,
if (status)
printk("NFSD: unable to find recovery directory %s\n",
if (!status)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment