Commit 57934278 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.1: Remove unused 'default allocation' for pnfs_alloc_layout_hdr()

...and ditto for pnfs_free_layout_hdr()
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent a9136d49
...@@ -200,8 +200,7 @@ static struct pnfs_layout_hdr * ...@@ -200,8 +200,7 @@ static struct pnfs_layout_hdr *
pnfs_alloc_layout_hdr(struct inode *ino, gfp_t gfp_flags) pnfs_alloc_layout_hdr(struct inode *ino, gfp_t gfp_flags)
{ {
struct pnfs_layoutdriver_type *ld = NFS_SERVER(ino)->pnfs_curr_ld; struct pnfs_layoutdriver_type *ld = NFS_SERVER(ino)->pnfs_curr_ld;
return ld->alloc_layout_hdr ? ld->alloc_layout_hdr(ino, gfp_flags) : return ld->alloc_layout_hdr(ino, gfp_flags);
kzalloc(sizeof(struct pnfs_layout_hdr), gfp_flags);
} }
static void static void
...@@ -218,7 +217,7 @@ pnfs_free_layout_hdr(struct pnfs_layout_hdr *lo) ...@@ -218,7 +217,7 @@ pnfs_free_layout_hdr(struct pnfs_layout_hdr *lo)
spin_unlock(&clp->cl_lock); spin_unlock(&clp->cl_lock);
} }
put_rpccred(lo->plh_lc_cred); put_rpccred(lo->plh_lc_cred);
return ld->alloc_layout_hdr ? ld->free_layout_hdr(lo) : kfree(lo); return ld->free_layout_hdr(lo);
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment