]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove redundant memory barriers around dio_private error status
authorNikolay Borisov <nborisov@suse.com>
Wed, 14 Feb 2018 08:53:36 +0000 (10:53 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:40 +0000 (15:09 +0200)
commita132819e1f8cb896e3b760b28159fe903e58b7c9
tree638c272a174b666c8bd4b8c7cf836e3d53cdef19
parent28cb17c72444903d7e75f6fbba8e5fd6cc888dbc
btrfs: Remove redundant memory barriers around dio_private error status

Using any kind of memory barriers around atomic operations which have
a return value is redundant, since those operations themselves are
fully ordered. atomic_t.txt states:

    - RMW operations that have a return value are fully ordered;

    Fully ordered primitives are ordered against everything prior and
    everything subsequent. Therefore a fully ordered primitive is like
    having an smp_mb() before and an smp_mb() after the primitive.

Given this let's replace the extra memory barriers with comments.

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/inode.c