diff options
| -rw-r--r-- | fs/nfs/nfs4proc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f94f6b3928fc..c77d296bdaa6 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
| @@ -6359,12 +6359,8 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata) | |||
| 6359 | return; | 6359 | return; |
| 6360 | } | 6360 | } |
| 6361 | spin_lock(&lo->plh_inode->i_lock); | 6361 | spin_lock(&lo->plh_inode->i_lock); |
| 6362 | if (task->tk_status == 0) { | 6362 | if (task->tk_status == 0 && lrp->res.lrs_present) |
| 6363 | if (lrp->res.lrs_present) { | 6363 | pnfs_set_layout_stateid(lo, &lrp->res.stateid, true); |
| 6364 | pnfs_set_layout_stateid(lo, &lrp->res.stateid, true); | ||
| 6365 | } else | ||
| 6366 | BUG_ON(!list_empty(&lo->plh_segs)); | ||
| 6367 | } | ||
| 6368 | lo->plh_block_lgets--; | 6364 | lo->plh_block_lgets--; |
| 6369 | spin_unlock(&lo->plh_inode->i_lock); | 6365 | spin_unlock(&lo->plh_inode->i_lock); |
| 6370 | dprintk("<-- %s\n", __func__); | 6366 | dprintk("<-- %s\n", __func__); |
