2006-01-13 01:01:10

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 013 of 26] 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 <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

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

diff ./fs/nfsd/nfs4recover.c~current~ ./fs/nfsd/nfs4recover.c
--- ./fs/nfsd/nfs4recover.c~current~ 2006-01-13 11:50:54.000000000 +1100
+++ ./fs/nfsd/nfs4recover.c 2006-01-13 11:51:07.000000000 +1100
@@ -222,8 +222,7 @@ nfsd4_list_rec_dir(struct dentry *dir, r

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;


-------------------------------------------------------
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