Browse Source

nfs: replace d_add with d_splice_alias in atomic_open

It's a trival change but follows knfsd export document that asks
for d_splice_alias during lookup.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Peng Tao 8 năm trước cách đây
mục cha
commit
774d9513a3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      fs/nfs/dir.c

+ 1 - 1
fs/nfs/dir.c

@@ -1518,7 +1518,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
 		d_drop(dentry);
 		switch (err) {
 		case -ENOENT:
-			d_add(dentry, NULL);
+			d_splice_alias(NULL, dentry);
 			nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
 			break;
 		case -EISDIR: