Skip to contentSkip to conversation

NFSv4.1: remove pnfs_layout_hdr from pnfs_destroy_all_layouts tmp_list

PATCH Superseded [email protected] 2 participants 2 messages May 11, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSv4.1: remove pnfs_layout_hdr from pnfs_destroy_all_layouts tmp_list

From: Andy Adamson <[email protected]>

Prevents an infinite loop as list was never emptied.

---
 fs/nfs/pnfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfs/pnfs.c +1 -0
index ff681ab..7626369 100644
@@ -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));
 	}
 }
Signature · 1 line
1.7.3.1
#1 lore raw
Quoted 14 lines · On Tue, 2011-05-10 at 20:54 -0400, [email protected] wrote:

From: Andy Adamson <[email protected]>

Prevents an infinite loop as list was never emptied.

---
 fs/nfs/pnfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfs/pnfs.c +0 -0
index ff681ab..7626369 100644

fs/nfs/pnfs.c pnfs_destroy_all_layouts(struct nfs_client *clp) · line 389

Quoted 7 lines
fs/nfs/pnfs.c +1 -0
@@ -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()?

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com