diff options
author | Omar Sandoval <osandov@fb.com> | 2020-04-16 14:46:20 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:26 +0200 |
commit | e3b318d14df7d6d04f37ce10f9a2f33ca3d550be (patch) | |
tree | 1168eeee23b8241c447b1f695e65c107967b1186 /fs/btrfs/btrfs_inode.h | |
parent | 2390a6daf92d241b23bc02687bfb9fabdf93f117 (diff) | |
download | linux-e3b318d14df7d6d04f37ce10f9a2f33ca3d550be.tar.gz linux-e3b318d14df7d6d04f37ce10f9a2f33ca3d550be.tar.bz2 linux-e3b318d14df7d6d04f37ce10f9a2f33ca3d550be.zip |
btrfs: convert btrfs_dio_private->pending_bios to refcount_t
This is really a reference count now, so convert it to refcount_t and
rename it to refs.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index ad36685ce046..b965fa5429ec 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -7,6 +7,7 @@ #define BTRFS_INODE_H #include <linux/hash.h> +#include <linux/refcount.h> #include "extent_map.h" #include "extent_io.h" #include "ordered-data.h" @@ -302,8 +303,11 @@ struct btrfs_dio_private { u64 disk_bytenr; u64 bytes; - /* number of bios pending for this dio */ - atomic_t pending_bios; + /* + * References to this structure. There is one reference per in-flight + * bio plus one while we're still setting up. + */ + refcount_t refs; /* IO errors */ int errors; |