summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2020-04-16 14:46:20 -0700
committerDavid Sterba <dsterba@suse.com>2020-05-25 11:25:26 +0200
commite3b318d14df7d6d04f37ce10f9a2f33ca3d550be (patch)
tree1168eeee23b8241c447b1f695e65c107967b1186 /fs/btrfs/btrfs_inode.h
parent2390a6daf92d241b23bc02687bfb9fabdf93f117 (diff)
downloadlinux-e3b318d14df7d6d04f37ce10f9a2f33ca3d550be.tar.bz2
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.h8
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;