[PATCH 2/2] SQUASHME: pnfs: get_lseg in nfs4_layoutget_prepare rather than in pnfs_has_layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pnfs_has_layout does not get_lref on its return value anymore

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
---
 fs/nfs/nfs4proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 25bc169..97cc539 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5442,12 +5442,12 @@ nfs4_layoutget_prepare(struct rpc_task *task, void *calldata)
 		return;
 	}
 	if (!lseg->valid) {
-		put_lseg_locked(lseg);
 		spin_unlock(&ino->i_lock);
 		dprintk("%s: invalid lseg found, waiting\n", __func__);
 		rpc_sleep_on(&nfsi->lo_rpcwaitq, task, NULL);
 		return;
 	}
+	get_lseg(lseg);
 	*lgp->lsegpp = lseg;
 	spin_unlock(&ino->i_lock);
 	dprintk("%s: valid lseg found, no rpc required\n", __func__);
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux