]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: replace error code from btrfs_drop_extents
authorDavid Sterba <dsterba@suse.cz>
Tue, 15 Apr 2014 16:50:17 +0000 (18:50 +0200)
committerChris Mason <clm@fb.com>
Thu, 24 Apr 2014 23:43:32 +0000 (16:43 -0700)
commit670318283b808d74569b6943509984aa5fb2ec9c
tree27c95d85e319fe75e4643fdeaf79ae928bbef6b3
parente30ca4bb66e1b08c875aaadf66b9b79c1ac80291
btrfs: replace error code from btrfs_drop_extents

There's a case which clone does not handle and used to BUG_ON instead,
(testcase xfstests/btrfs/035), now returns EINVAL. This error code is
confusing to the ioctl caller, as it normally signifies errorneous
arguments.

Change it to ENOPNOTSUPP which allows a fall back to copy instead of
clone. This does not affect the common reflink operation.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/file.c
fs/btrfs/ioctl.c