[PATCH] fuse: Do NULL check instead of IS_ERR in atomic_open

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

 



Since d_splice_alias returns NULL on error, we need to do NUL check
instead of IS_ERR.

Signed-off-by: Keiichi Watanabe <keiichiw@xxxxxxxxxxxx>
---
 fs/fuse/dir.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 4ae89f428243..4843a749dd91 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -914,7 +914,7 @@ static int _fuse_atomic_open(struct inode *dir, struct dentry *entry,
 		alias = d_exact_alias(entry, inode);
 		if (!alias) {
 			alias = d_splice_alias(inode, entry);
-			if (IS_ERR(alias)) {
+			if (!alias) {
 				/*
 				 * Close the file in user space, but do not unlink it,
 				 * if it was created - with network file systems other
@@ -928,8 +928,7 @@ static int _fuse_atomic_open(struct inode *dir, struct dentry *entry,
 			}
 		}
 
-		if (alias)
-			entry = alias;
+		entry = alias; // alias must not be NULL here.
 	}
 
 	fuse_change_entry_timeout(entry, &outentry);
-- 
2.44.0.291.gc1ea87d7ee-goog





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux