All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] fat: Fix d_splice_alias() return code checking
@ 2014-10-19 10:39 Richard Weinberger
  2014-10-19 10:39   ` [Ocfs2-devel] " Richard Weinberger
  2014-10-20 12:34 ` [PATCH 1/2] fat: " Al Viro
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Weinberger @ 2014-10-19 10:39 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-kernel, Richard Weinberger, OGAWA Hirofumi

d_splice_alias() can return a valid dentry, NULL or an ERR_PTR.
Currently the code checks not for ERR_PTR.
Fix this by using IS_ERR_OR_NULL().

Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 fs/fat/namei_vfat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index 6df8d3d..8f93464 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -757,7 +757,7 @@ out:
 	mutex_unlock(&MSDOS_SB(sb)->s_lock);
 	dentry->d_time = dentry->d_parent->d_inode->i_version;
 	dentry = d_splice_alias(inode, dentry);
-	if (dentry)
+	if (!IS_ERR_OR_NULL(dentry))
 		dentry->d_time = dentry->d_parent->d_inode->i_version;
 	return dentry;
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-23 15:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 10:39 [PATCH 1/2] fat: Fix d_splice_alias() return code checking Richard Weinberger
2014-10-19 10:39 ` [PATCH 2/2] ocfs2: " Richard Weinberger
2014-10-19 10:39   ` [Ocfs2-devel] " Richard Weinberger
2014-10-20 23:12   ` Andrew Morton
2014-10-20 23:12     ` Andrew Morton
2014-10-22 20:33     ` Richard Weinberger
2014-10-22 20:33       ` Richard Weinberger
2014-10-20 12:34 ` [PATCH 1/2] fat: " Al Viro
2014-10-23 15:21   ` OGAWA Hirofumi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.