]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce try-lock semantics for exclusive op start
authorDavid Sterba <dsterba@suse.com>
Tue, 18 May 2021 19:05:52 +0000 (21:05 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:07 +0000 (15:19 +0200)
commit738dee5b61f03a9dd55a1fa029cb3f31498fd6e7
tree34b99a4941ad28d03dff7547c4ec93d5bcaf1909
parent38137efc16c3fa0635f334753d02d7711ccd6020
btrfs: introduce try-lock semantics for exclusive op start

Add try-lock for exclusive operation start to allow callers to do more
checks. The same operation must already be running. The try-lock and
unlock must pair and are a substitute for btrfs_exclop_start, thus it
must also pair with btrfs_exclop_finish to release the exclop context.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/ioctl.c