Skip to content

Commit

Permalink
NFSv4.1: Remove unused 'default allocation' for pnfs_alloc_layout_hdr()
Browse files Browse the repository at this point in the history
...and ditto for pnfs_free_layout_hdr()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 28, 2012
1 parent a9136d4 commit 5793427
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ static struct pnfs_layout_hdr *
pnfs_alloc_layout_hdr(struct inode *ino, gfp_t gfp_flags)
{
struct pnfs_layoutdriver_type *ld = NFS_SERVER(ino)->pnfs_curr_ld;
return ld->alloc_layout_hdr ? ld->alloc_layout_hdr(ino, gfp_flags) :
kzalloc(sizeof(struct pnfs_layout_hdr), gfp_flags);
return ld->alloc_layout_hdr(ino, gfp_flags);
}

static void
Expand All @@ -218,7 +217,7 @@ pnfs_free_layout_hdr(struct pnfs_layout_hdr *lo)
spin_unlock(&clp->cl_lock);
}
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
Expand Down

0 comments on commit 5793427

Please sign in to comment.