the 'error' variable was been assigned twice in vain.
Signed-off-by: Geyslan G. Bem <[email protected]>
---
fs/nfs/unlink.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index bb939ed..0c29b1b 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -493,7 +493,7 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentry)
unsigned long long fileid;
struct dentry *sdentry;
struct rpc_task *task;
- int error = -EIO;
+ int error = -EBUSY;
dfprintk(VFS, "NFS: silly-rename(%s/%s, ct=%d)\n",
dentry->d_parent->d_name.name, dentry->d_name.name,
@@ -503,7 +503,6 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentry)
/*
* We don't allow a dentry to be silly-renamed twice.
*/
- error = -EBUSY;
if (dentry->d_flags & DCACHE_NFSFS_RENAMED)
goto out;
--
1.8.4
Hi,
I've got a problem on the nfs export operation. I'm not sure if this is the right place to ask this, if not, can you please tell me where?
Here's what I need:
1. I have a folder named /mnt/fs1 to be exported.
2. All the host in subnetwork 192.168.0.0/16 should be able access this folder, but their root should be squashed.
3. Some specified host in the same subnetwork can gain the root permission on the folder, for example: 192.168.0.21, 192.168.0.22.
I've got a SLES11SP1 box as the nfs server, the nfs clients are SLES11SP1, too. And the test uses nfsv3.
Here are the commands I used to do the export:
#exportfs -o rw,root_squash 192.168.0.0/16:/mnt/fs1 #exportfs -o rw,no_root_squash 192.168.0.21:/mnt/fs1 #exportfs -o rw,no_root_squash 192.168.0.22:/mnt/fs1
After this, everything works as expected.
But, after the following operations:
#exportfs -u 192.168.0.0/16:/mnt/fs1 /* Delete this export */
# exportfs -o rw,root_squash 192.168.0.0/16:/mnt/fs1 /* And add it again */
Hosts on 192.168.0.21 and 192.168.0.22 doesn't get root permission any more. when I tried to write a file, it complains about "Permission denied".
So, does the order of exportfs command has something to do the final result? Or am I doing something wrong?
B.R
Minlan Wang