aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-04-19 19:05:48 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-05-14 15:09:28 -0400
commitb157b06ca24514ef4b766cabb8e852c950040923 (patch)
tree646478c1a0481ed5ee20ead8313f36a5368bf4d8 /fs/nfs/super.c
parentce587e07ba2e25b5c9d286849885b82676661f3e (diff)
NFS: Cleanup file handle allocations in fs/nfs/super.c
Use the new helper functions instead of open coding. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 50c6c282ba40..ee051a40fac8 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2176,7 +2176,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
2176 int error = -ENOMEM; 2176 int error = -ENOMEM;
2177 2177
2178 data = nfs_alloc_parsed_mount_data(3); 2178 data = nfs_alloc_parsed_mount_data(3);
2179 mntfh = kzalloc(sizeof(*mntfh), GFP_KERNEL); 2179 mntfh = nfs_alloc_fhandle();
2180 if (data == NULL || mntfh == NULL) 2180 if (data == NULL || mntfh == NULL)
2181 goto out_free_fh; 2181 goto out_free_fh;
2182 2182
@@ -2251,7 +2251,7 @@ out:
2251 kfree(data->fscache_uniq); 2251 kfree(data->fscache_uniq);
2252 security_free_mnt_opts(&data->lsm_opts); 2252 security_free_mnt_opts(&data->lsm_opts);
2253out_free_fh: 2253out_free_fh:
2254 kfree(mntfh); 2254 nfs_free_fhandle(mntfh);
2255 kfree(data); 2255 kfree(data);
2256 return error; 2256 return error;
2257 2257
@@ -2560,7 +2560,7 @@ static int nfs4_remote_get_sb(struct file_system_type *fs_type,
2560 }; 2560 };
2561 int error = -ENOMEM; 2561 int error = -ENOMEM;
2562 2562
2563 mntfh = kzalloc(sizeof(*mntfh), GFP_KERNEL); 2563 mntfh = nfs_alloc_fhandle();
2564 if (data == NULL || mntfh == NULL) 2564 if (data == NULL || mntfh == NULL)
2565 goto out_free_fh; 2565 goto out_free_fh;
2566 2566
@@ -2618,7 +2618,7 @@ static int nfs4_remote_get_sb(struct file_system_type *fs_type,
2618out: 2618out:
2619 security_free_mnt_opts(&data->lsm_opts); 2619 security_free_mnt_opts(&data->lsm_opts);
2620out_free_fh: 2620out_free_fh:
2621 kfree(mntfh); 2621 nfs_free_fhandle(mntfh);
2622 return error; 2622 return error;
2623 2623
2624out_free: 2624out_free: