summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-20 20:46:49 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-28 16:03:15 -0400
commit905ca191cfe1ab18822d86e3ddef1b1b38832fdc (patch)
treeb8e6a5056878adf3f0f3423f3f8c859467e16112 /fs/nfs/pnfs.c
parent9c6263819f25254f2ed48f076b50096dd5893dfb (diff)
downloadlinux-stable-905ca191cfe1ab18822d86e3ddef1b1b38832fdc.tar.gz
linux-stable-905ca191cfe1ab18822d86e3ddef1b1b38832fdc.tar.bz2
linux-stable-905ca191cfe1ab18822d86e3ddef1b1b38832fdc.zip
NFSv4.1: Clean up pnfs_put_lseg()
There is no longer a need to use pnfs_free_lseg_list(). Just call pnfs_free_lseg() directly. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 11cc0ad6b409..c34ba9a0a46f 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -315,7 +315,7 @@ init_lseg(struct pnfs_layout_hdr *lo, struct pnfs_layout_segment *lseg)
lseg->pls_layout = lo;
}
-static void free_lseg(struct pnfs_layout_segment *lseg)
+static void pnfs_free_lseg(struct pnfs_layout_segment *lseg)
{
struct inode *ino = lseg->pls_layout->plh_inode;
@@ -352,12 +352,9 @@ pnfs_put_lseg(struct pnfs_layout_segment *lseg)
lo = lseg->pls_layout;
inode = lo->plh_inode;
if (atomic_dec_and_lock(&lseg->pls_refcount, &inode->i_lock)) {
- LIST_HEAD(free_me);
-
pnfs_layout_remove_lseg(lo, lseg);
spin_unlock(&inode->i_lock);
- list_add(&lseg->pls_list, &free_me);
- pnfs_free_lseg_list(&free_me);
+ pnfs_free_lseg(lseg);
}
}
EXPORT_SYMBOL_GPL(pnfs_put_lseg);
@@ -494,7 +491,7 @@ pnfs_free_lseg_list(struct list_head *free_me)
list_for_each_entry_safe(lseg, tmp, free_me, pls_list) {
list_del(&lseg->pls_list);
- free_lseg(lseg);
+ pnfs_free_lseg(lseg);
}
}