aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorPeng Tao <peng_tao@emc.com>2011-07-30 20:52:33 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-07-31 12:18:15 -0400
commita9bae5666d0510ad69bdb437371c9a3e6b770705 (patch)
tree5f94d5b75d7d870df9812f1bf277d91d9d7d66c1 /fs/nfs/nfs4proc.c
parent9fa4075878a5faac872a63f4a97ce79c776264e9 (diff)
pnfs: let layoutcommit handle a list of lseg
There can be multiple lseg per file, so layoutcommit should be able to handle it. [Needed in v3.0] CC: Stable Tree <stable@kernel.org> Signed-off-by: Peng Tao <peng_tao@emc.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 079614deca3f..efa6ae822ca8 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5912,9 +5912,15 @@ nfs4_layoutcommit_done(struct rpc_task *task, void *calldata)
5912static void nfs4_layoutcommit_release(void *calldata) 5912static void nfs4_layoutcommit_release(void *calldata)
5913{ 5913{
5914 struct nfs4_layoutcommit_data *data = calldata; 5914 struct nfs4_layoutcommit_data *data = calldata;
5915 struct pnfs_layout_segment *lseg, *tmp;
5915 5916
5916 /* Matched by references in pnfs_set_layoutcommit */ 5917 /* Matched by references in pnfs_set_layoutcommit */
5917 put_lseg(data->lseg); 5918 list_for_each_entry_safe(lseg, tmp, &data->lseg_list, pls_lc_list) {
5919 list_del_init(&lseg->pls_lc_list);
5920 if (test_and_clear_bit(NFS_LSEG_LAYOUTCOMMIT,
5921 &lseg->pls_flags))
5922 put_lseg(lseg);
5923 }
5918 put_rpccred(data->cred); 5924 put_rpccred(data->cred);
5919 kfree(data); 5925 kfree(data);
5920} 5926}