]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Return EAGAIN if we can't start no snpashot write in check_can_nocow
authorNikolay Borisov <nborisov@suse.com>
Tue, 7 May 2019 07:23:46 +0000 (10:23 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:59 +0000 (13:34 +0200)
commit15e3440a3f307c00bccf20ca5dfa8596a6a8b2c2
treea740d0b6d57d28ad971f59baf93cc8827f8640ec
parent68fd9c99f33ccfee494d21618357bef371045658
btrfs: Return EAGAIN if we can't start no snpashot write in check_can_nocow

The first thing code does in check_can_nocow is trying to block
concurrent snapshots. If this fails (due to snpashot already being in
progress) the function returns ENOSPC which makes no sense. Instead
return EAGAIN. Despite this return value not being propagated to callers
it's good practice to return the closest in terms of semantics error
code. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c