summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2018-01-09 08:21:17 -0500
committerJeff Layton <jlayton@redhat.com>2018-01-29 06:42:21 -0500
commit1eb5d98f16f6d71af8781436d2b0bcf9236f7fc6 (patch)
tree9fc2e9515a9762e2711f3c3078d4ab865492f0d4 /fs/nfs/write.c
parentee73f9a52a34377887acfa3b76169709e80d577c (diff)
nfs: convert to new i_version API
For NFS, we just use the "raw" API since the i_version is mostly managed by the server. The exception there is when the client holds a write delegation, but we only need to bump it once there anyway to handle CB_GETATTR. Tested-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 5b5f464f6f2a..f87cbe126fa0 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -23,6 +23,7 @@
23#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/freezer.h> 24#include <linux/freezer.h>
25#include <linux/wait.h> 25#include <linux/wait.h>
26#include <linux/iversion.h>
26 27
27#include <linux/uaccess.h> 28#include <linux/uaccess.h>
28 29
@@ -753,11 +754,8 @@ static void nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
753 */ 754 */
754 spin_lock(&mapping->private_lock); 755 spin_lock(&mapping->private_lock);
755 if (!nfs_have_writebacks(inode) && 756 if (!nfs_have_writebacks(inode) &&
756 NFS_PROTO(inode)->have_delegation(inode, FMODE_WRITE)) { 757 NFS_PROTO(inode)->have_delegation(inode, FMODE_WRITE))
757 spin_lock(&inode->i_lock); 758 inode_inc_iversion_raw(inode);
758 inode->i_version++;
759 spin_unlock(&inode->i_lock);
760 }
761 if (likely(!PageSwapCache(req->wb_page))) { 759 if (likely(!PageSwapCache(req->wb_page))) {
762 set_bit(PG_MAPPED, &req->wb_flags); 760 set_bit(PG_MAPPED, &req->wb_flags);
763 SetPagePrivate(req->wb_page); 761 SetPagePrivate(req->wb_page);