Re: [PATCH 3/3] btrfs: do proper error handling in btrfs_insert_xattr_item

2017-02-28 Thread David Sterba
On Tue, Feb 21, 2017 at 09:39:05PM -0800, Liu Bo wrote: > On Mon, Feb 20, 2017 at 07:25:06PM +0100, David Sterba wrote: > > The space check in btrfs_insert_xattr_item is duplicated in it's caller > > (do_setxattr) so we won't hit the BUG_ON. Continuing without any check > > could be disasterous so

Re: [PATCH 3/3] btrfs: do proper error handling in btrfs_insert_xattr_item

2017-02-21 Thread Liu Bo
On Mon, Feb 20, 2017 at 07:25:06PM +0100, David Sterba wrote: > The space check in btrfs_insert_xattr_item is duplicated in it's caller > (do_setxattr) so we won't hit the BUG_ON. Continuing without any check > could be disasterous so turn it to a proper error handling. > > Signed-off-by: David

[PATCH 3/3] btrfs: do proper error handling in btrfs_insert_xattr_item

2017-02-20 Thread David Sterba
The space check in btrfs_insert_xattr_item is duplicated in it's caller (do_setxattr) so we won't hit the BUG_ON. Continuing without any check could be disasterous so turn it to a proper error handling. Signed-off-by: David Sterba --- fs/btrfs/dir-item.c | 3 ++- 1 file