diff options
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index be963a133aaa..06da7506363c 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -222,8 +222,7 @@ nfsd4_list_rec_dir(struct dentry *dir, recdir_func *f) | |||
222 | 222 | ||
223 | nfs4_save_user(&uid, &gid); | 223 | nfs4_save_user(&uid, &gid); |
224 | 224 | ||
225 | filp = dentry_open(dget(dir), mntget(rec_dir.mnt), | 225 | filp = dentry_open(dget(dir), mntget(rec_dir.mnt), O_RDONLY); |
226 | O_RDWR); | ||
227 | status = PTR_ERR(filp); | 226 | status = PTR_ERR(filp); |
228 | if (IS_ERR(filp)) | 227 | if (IS_ERR(filp)) |
229 | goto out; | 228 | goto out; |
@@ -400,9 +399,10 @@ nfsd4_init_recdir(char *rec_dirname) | |||
400 | 399 | ||
401 | nfs4_save_user(&uid, &gid); | 400 | nfs4_save_user(&uid, &gid); |
402 | 401 | ||
403 | status = path_lookup(rec_dirname, LOOKUP_FOLLOW, &rec_dir); | 402 | status = path_lookup(rec_dirname, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, |
404 | if (status == -ENOENT) | 403 | &rec_dir); |
405 | printk("NFSD: recovery directory %s doesn't exist\n", | 404 | if (status) |
405 | printk("NFSD: unable to find recovery directory %s\n", | ||
406 | rec_dirname); | 406 | rec_dirname); |
407 | 407 | ||
408 | if (!status) | 408 | if (!status) |