summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pagelist.c
diff options
context:
space:
mode:
authorWeston Andros Adamson2014-07-11 16:20:45 +0200
committerTrond Myklebust2014-07-12 22:51:41 +0200
commit17089a29a25a3bfe8d14520cd866b7d635ffe5ba (patch)
tree9f95e42cf5a06bd36089d7f81f47d23ba2b6530d /fs/nfs/pagelist.c
parentnfs: only show Posix ACLs in listxattr if actually present (diff)
downloadkernel-qcow2-linux-17089a29a25a3bfe8d14520cd866b7d635ffe5ba.tar.gz
kernel-qcow2-linux-17089a29a25a3bfe8d14520cd866b7d635ffe5ba.tar.xz
kernel-qcow2-linux-17089a29a25a3bfe8d14520cd866b7d635ffe5ba.zip
nfs: mark nfs_page reqs with flag for extra ref
Change the use of PG_INODE_REF - set it when taking extra reference on subrequests and take care to only release once for each request. Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r--fs/nfs/pagelist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index b6ee3a6ee96d..7368b2130a41 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -251,8 +251,10 @@ nfs_page_group_init(struct nfs_page *req, struct nfs_page *prev)
/* grab extra ref if head request has extra ref from
* the write/commit path to handle handoff between write
* and commit lists */
- if (test_bit(PG_INODE_REF, &prev->wb_head->wb_flags))
+ if (test_bit(PG_INODE_REF, &prev->wb_head->wb_flags)) {
+ set_bit(PG_INODE_REF, &req->wb_flags);
kref_get(&req->wb_kref);
+ }
}
}