NFS: Use wait_on_atomic_t() for unlock after readahead
authorBenjamin Coddington <bcodding@redhat.com>
Wed, 6 Jan 2016 15:40:18 +0000 (10:40 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 7 Jan 2016 23:42:51 +0000 (18:42 -0500)
commit210c7c1750fdf769647d1d526c9ea34c412c9eee
treed3e6e91f525fad7ab5fb23f38075af32184cc87c
parent942e3d72a62dcfe5bf1569b179174718bbbcfbc3
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>
fs/nfs/file.c
fs/nfs/inode.c
fs/nfs/internal.h
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_fs.h