]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Fix xattr check in ocfs2_get_xattr_nolock()
authorJan Kara <jack@suse.cz>
Wed, 10 Dec 2014 23:41:40 +0000 (15:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:03 +0000 (17:41 -0800)
commitf9dafdd11b14d0618e639edc7caef88abc822b44
treeb0c38765711fd380f7cbb51f0d3cc2cb453fe7c2
parentd94d99864c1f53523f9155c2f8bf0056a3fc62ba
ocfs2: Fix xattr check in ocfs2_get_xattr_nolock()

ocfs2_get_xattr_nolock() checks whether inode has any extended attributes
(OCFS2_HAS_XATTR_FL).  If not, it just sets 'ret' to -ENODATA but
continues with checking inline and external attributes anyway (which is
pointless although it does not harm).  Just return immediately when we
know there are no extended attributes in the inode.

Coverity id: 1226906.

Signed-off-by: Jan Kara <jack@suse.cz>
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/xattr.c