[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>
This commit is contained in:
committed by
Linus Torvalds
parent
5fb8b49e29
commit
d22749b62f
@@ -222,8 +222,7 @@ nfsd4_list_rec_dir(struct dentry *dir, recdir_func *f)
|
|||||||
|
|
||||||
nfs4_save_user(&uid, &gid);
|
nfs4_save_user(&uid, &gid);
|
||||||
|
|
||||||
filp = dentry_open(dget(dir), mntget(rec_dir.mnt),
|
filp = dentry_open(dget(dir), mntget(rec_dir.mnt), O_RDONLY);
|
||||||
O_RDWR);
|
|
||||||
status = PTR_ERR(filp);
|
status = PTR_ERR(filp);
|
||||||
if (IS_ERR(filp))
|
if (IS_ERR(filp))
|
||||||
goto out;
|
goto out;
|
||||||
|
Reference in New Issue
Block a user