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 <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user