aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/dir.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index c9196c9cf5a6..662df2a5fad5 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -34,6 +34,7 @@
34#include <linux/mount.h> 34#include <linux/mount.h>
35#include <linux/sched.h> 35#include <linux/sched.h>
36#include <linux/vmalloc.h> 36#include <linux/vmalloc.h>
37#include <linux/kmemleak.h>
37 38
38#include "delegation.h" 39#include "delegation.h"
39#include "iostat.h" 40#include "iostat.h"
@@ -238,6 +239,11 @@ int nfs_readdir_make_qstr(struct qstr *string, const char *name, unsigned int le
238 string->name = kmemdup(name, len, GFP_KERNEL); 239 string->name = kmemdup(name, len, GFP_KERNEL);
239 if (string->name == NULL) 240 if (string->name == NULL)
240 return -ENOMEM; 241 return -ENOMEM;
242 /*
243 * Avoid a kmemleak false positive. The pointer to the name is stored
244 * in a page cache page which kmemleak does not scan.
245 */
246 kmemleak_not_leak(string->name);
241 string->hash = full_name_hash(name, len); 247 string->hash = full_name_hash(name, len);
242 return 0; 248 return 0;
243} 249}