]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ext4: clean up ext4_xattr_inode_get()
authorTahsin Erdogan <tahsin@google.com>
Thu, 22 Jun 2017 01:57:36 +0000 (21:57 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 22 Jun 2017 01:57:36 +0000 (21:57 -0400)
commit909666933210eb145bc93426ce07f66bf3d1f798
tree2860c6d369f273f7f3854c0c52c4c8bc43753524
parentbab79b04999ccbbf59f1693d0783cd6ae27e4278
ext4: clean up ext4_xattr_inode_get()

The input and output values of *size parameter are equal on successful
return from ext4_xattr_inode_get().  On error return, the callers ignore
the output value so there is no need to update it.

Also check for NULL return from ext4_bread().  If the actual xattr inode
size happens to be smaller than the expected size, ext4_bread() may
return NULL which would indicate data corruption.

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/xattr.c