From: Trond Myklebust Date: Fri, 21 Sep 2012 00:37:23 +0000 (-0400) Subject: NFSv4.1: Remove unused 'default allocation' for pnfs_alloc_layout_hdr() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=579342785f7069d32e9637ef30d59c4256dcec3d;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git NFSv4.1: Remove unused 'default allocation' for pnfs_alloc_layout_hdr() ...and ditto for pnfs_free_layout_hdr() Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index edc8288fd3d4..fcc72ecf2fd7 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -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 @@ -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