aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2016-01-06 10:40:18 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-01-07 18:42:51 -0500
commit210c7c1750fdf769647d1d526c9ea34c412c9eee (patch)
treed3e6e91f525fad7ab5fb23f38075af32184cc87c /include/linux/nfs_fs.h
parentMerge branch 'pnfs_generic' (diff)
downloadwireguard-linux-210c7c1750fdf769647d1d526c9ea34c412c9eee.tar.xz
wireguard-linux-210c7c1750fdf769647d1d526c9ea34c412c9eee.zip
NFS: Use wait_on_atomic_t() for unlock after readahead
The use of wait_on_atomic_t() for waiting on I/O to complete before unlocking allows us to git rid of the NFS_IO_INPROGRESS flag, and thus the nfs_iocounter's flags member, and finally the nfs_iocounter altogether. The count of I/O is moved to the lock context, and the counter increment/decrement functions become simple enough to open-code. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> [Trond: Fix up conflict with existing function nfs_wait_atomic_killable()] Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 9eee972863a7..196aaceafda7 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -60,18 +60,12 @@ struct nfs_lockowner {
pid_t l_pid;
};
-#define NFS_IO_INPROGRESS 0
-struct nfs_io_counter {
- unsigned long flags;
- atomic_t io_count;
-};
-
struct nfs_lock_context {
atomic_t count;
struct list_head list;
struct nfs_open_context *open_context;
struct nfs_lockowner lockowner;
- struct nfs_io_counter io_count;
+ atomic_t io_count;
};
struct nfs4_state;