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