]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix d_splice_alias() return code checking
authorRichard Weinberger <richard@nod.at>
Wed, 29 Oct 2014 21:50:53 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 29 Oct 2014 23:33:15 +0000 (16:33 -0700)
commitce5b9c21a61512deb4662d9b2ea8295b5c37eac1
treeee64a8efc40fd2604483dd01171700b0e14d7ad5
parent70bbe99cfc315fb3847d5d8facb59ea8a2cec189
ocfs2: fix d_splice_alias() return code checking

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

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/namei.c