From 01d0ae8beaee75d954900109619b700fe68707d9 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Mon, 20 Mar 2006 13:44:48 -0500 Subject: NFSv4: Fix an oops in nfs4_fill_super The mount statistics patches introduced a call to nfs_free_iostats that is not only redundant, but actually causes an oops. Also fix a memory leak due to the lack of a call to nfs_free_iostats on unmount. Signed-off-by: Trond Myklebust --- fs/nfs/iostat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/nfs/iostat.h') diff --git a/fs/nfs/iostat.h b/fs/nfs/iostat.h index 7a7495153317..6350ecbde589 100644 --- a/fs/nfs/iostat.h +++ b/fs/nfs/iostat.h @@ -156,7 +156,8 @@ static inline struct nfs_iostats *nfs_alloc_iostats(void) static inline void nfs_free_iostats(struct nfs_iostats *stats) { - free_percpu(stats); + if (stats != NULL) + free_percpu(stats); } #endif -- cgit v1.2.3