diff mbox

[1/1] NFSv4.1: remove pnfs_layout_hdr from pnfs_destroy_all_layouts tmp_list

Message ID 1305075245-27123-1-git-send-email-andros@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Adamson May 11, 2011, 12:54 a.m. UTC
From: Andy Adamson <andros@netapp.com>

Prevents an infinite loop as list was never emptied.

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/pnfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Trond Myklebust May 11, 2011, 6:04 p.m. UTC | #1
On Tue, 2011-05-10 at 20:54 -0400, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> Prevents an infinite loop as list was never emptied.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/pnfs.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index ff681ab..7626369 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -383,6 +383,7 @@ pnfs_destroy_all_layouts(struct nfs_client *clp)
>  				plh_layouts);
>  		dprintk("%s freeing layout for inode %lu\n", __func__,
>  			lo->plh_inode->i_ino);
> +		list_del(&lo->plh_layouts);
>  		pnfs_destroy_layout(NFS_I(lo->plh_inode));
>  	}
>  }

Shouldn't that be list_del_init()?
diff mbox

Patch

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index ff681ab..7626369 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -383,6 +383,7 @@  pnfs_destroy_all_layouts(struct nfs_client *clp)
 				plh_layouts);
 		dprintk("%s freeing layout for inode %lu\n", __func__,
 			lo->plh_inode->i_ino);
+		list_del(&lo->plh_layouts);
 		pnfs_destroy_layout(NFS_I(lo->plh_inode));
 	}
 }