[PATCH 2/2] nfs: fix return err if inode exiting in nfs_instantiate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In common function nfs_instantiate to create, mkdir, and mknod,
if dentry->d_inode exits, it should return -EEXIST instead of
-EACCES.

Signed-off-by: Rui Xiang <rui.xiang@xxxxxxxxxx>
---
 fs/nfs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2518865..e570b37 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1547,7 +1547,7 @@ int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle,
 	struct dentry *parent = dget_parent(dentry);
 	struct inode *dir = parent->d_inode;
 	struct inode *inode;
-	int error = -EACCES;
+	int error = -EEXIST;
 
 	d_drop(dentry);
 
-- 
1.8.2.2


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux