Commit c7321b76 authored by David Sterba's avatar David Sterba

btrfs: convert BTRFS_ILOCK-* defines to enum bit

Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d549ff7b
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "async-thread.h" #include "async-thread.h"
#include "block-rsv.h" #include "block-rsv.h"
#include "locking.h" #include "locking.h"
#include "misc.h"
struct btrfs_trans_handle; struct btrfs_trans_handle;
struct btrfs_transaction; struct btrfs_transaction;
...@@ -3131,9 +3132,11 @@ struct iomap_dio *btrfs_dio_write(struct kiocb *iocb, struct iov_iter *iter, ...@@ -3131,9 +3132,11 @@ struct iomap_dio *btrfs_dio_write(struct kiocb *iocb, struct iov_iter *iter,
extern const struct dentry_operations btrfs_dentry_operations; extern const struct dentry_operations btrfs_dentry_operations;
/* Inode locking type flags, by default the exclusive lock is taken */ /* Inode locking type flags, by default the exclusive lock is taken */
#define BTRFS_ILOCK_SHARED (1U << 0) enum btrfs_ilock_type {
#define BTRFS_ILOCK_TRY (1U << 1) ENUM_BIT(BTRFS_ILOCK_SHARED),
#define BTRFS_ILOCK_MMAP (1U << 2) ENUM_BIT(BTRFS_ILOCK_TRY),
ENUM_BIT(BTRFS_ILOCK_MMAP),
};
int btrfs_inode_lock(struct inode *inode, unsigned int ilock_flags); int btrfs_inode_lock(struct inode *inode, unsigned int ilock_flags);
void btrfs_inode_unlock(struct inode *inode, unsigned int ilock_flags); void btrfs_inode_unlock(struct inode *inode, unsigned int ilock_flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment