summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2006-01-19 02:43:27 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-19 04:20:26 +0100
commitd22749b62f3e12de26b86a200f9a5bf7afe3590e (patch)
treedba05760944d9c91565955de182b2684af0bb19a /fs/nfsd
parent[PATCH] svcrpc: gss: svc context creation error handling (diff)
downloadlinux-d22749b62f3e12de26b86a200f9a5bf7afe3590e.tar.xz
linux-d22749b62f3e12de26b86a200f9a5bf7afe3590e.zip
[PATCH] nfsd4: fix open of recovery directory
We should be opening this directory RDONLY, not RDWR. Thanks to Christoph Hellwig for the bug report. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4recover.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index be963a133aaa..64f4af3651a1 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)
nfs4_save_user(&uid, &gid);
- filp = dentry_open(dget(dir), mntget(rec_dir.mnt),
- O_RDWR);
+ filp = dentry_open(dget(dir), mntget(rec_dir.mnt), O_RDONLY);
status = PTR_ERR(filp);
if (IS_ERR(filp))
goto out;