diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-21 16:37:02 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-28 16:03:17 -0400 |
commit | e5929f3cff05e84f20c68df235f4768920e2e89e (patch) | |
tree | 849a2fec772d7c8d9a54288659f9d4ba9c8a915f /fs/nfs/pnfs.c | |
parent | 173f77e9c5cbddb02eebe17dd9c48d39e5eb86b9 (diff) |
NFSv4.1: Remove the NFS_LAYOUT_RETURNED state
It serves no purpose that the test for whether or not we have valid
layout segments doesn't already serve.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 174c51a5001c..20a1b6222ff6 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -692,7 +692,7 @@ _pnfs_return_layout(struct inode *ino) | |||
692 | 692 | ||
693 | spin_lock(&ino->i_lock); | 693 | spin_lock(&ino->i_lock); |
694 | lo = nfsi->layout; | 694 | lo = nfsi->layout; |
695 | if (!lo || pnfs_test_layout_returned(lo)) { | 695 | if (!lo) { |
696 | spin_unlock(&ino->i_lock); | 696 | spin_unlock(&ino->i_lock); |
697 | dprintk("NFS: %s no layout to return\n", __func__); | 697 | dprintk("NFS: %s no layout to return\n", __func__); |
698 | goto out; | 698 | goto out; |
@@ -710,7 +710,6 @@ _pnfs_return_layout(struct inode *ino) | |||
710 | goto out; | 710 | goto out; |
711 | } | 711 | } |
712 | lo->plh_block_lgets++; | 712 | lo->plh_block_lgets++; |
713 | pnfs_mark_layout_returned(lo); | ||
714 | spin_unlock(&ino->i_lock); | 713 | spin_unlock(&ino->i_lock); |
715 | pnfs_free_lseg_list(&tmp_list); | 714 | pnfs_free_lseg_list(&tmp_list); |
716 | 715 | ||
@@ -721,7 +720,6 @@ _pnfs_return_layout(struct inode *ino) | |||
721 | status = -ENOMEM; | 720 | status = -ENOMEM; |
722 | pnfs_layout_io_set_failed(lo, IOMODE_RW); | 721 | pnfs_layout_io_set_failed(lo, IOMODE_RW); |
723 | pnfs_layout_io_set_failed(lo, IOMODE_READ); | 722 | pnfs_layout_io_set_failed(lo, IOMODE_READ); |
724 | pnfs_clear_layout_returned(lo); | ||
725 | pnfs_put_layout_hdr(lo); | 723 | pnfs_put_layout_hdr(lo); |
726 | goto out; | 724 | goto out; |
727 | } | 725 | } |
@@ -1111,9 +1109,6 @@ pnfs_update_layout(struct inode *ino, | |||
1111 | if (list_empty(&lo->plh_segs)) | 1109 | if (list_empty(&lo->plh_segs)) |
1112 | first = true; | 1110 | first = true; |
1113 | 1111 | ||
1114 | /* Enable LAYOUTRETURNs */ | ||
1115 | pnfs_clear_layout_returned(lo); | ||
1116 | |||
1117 | spin_unlock(&ino->i_lock); | 1112 | spin_unlock(&ino->i_lock); |
1118 | if (first) { | 1113 | if (first) { |
1119 | /* The lo must be on the clp list if there is any | 1114 | /* The lo must be on the clp list if there is any |