linux/fs/ntfs3
Kari Argillander 195c52bdd5
fs/ntfs3: Do not use driver own alloc wrappers
Problem with these wrapper is that we cannot take off example GFP_NOFS
flag. It is not recomended use those in all places. Also if we change
one driver specific wrapper to kernel wrapper then it would look really
weird. People should be most familiar with kernel wrappers so let's just
use those ones.

Driver specific alloc wrapper also confuse some static analyzing tools,
good example is example kernels checkpatch tool. After we converter
these to kernel specific then warnings is showed.

Following Coccinelle script was used to automate changing.

virtual patch

@alloc depends on patch@
expression x;
expression y;
@@
(
-	ntfs_malloc(x)
+	kmalloc(x, GFP_NOFS)
|
-	ntfs_zalloc(x)
+	kzalloc(x, GFP_NOFS)
|
-	ntfs_vmalloc(x)
+	kvmalloc(x, GFP_NOFS)
|
-	ntfs_free(x)
+	kfree(x)
|
-	ntfs_vfree(x)
+	kvfree(x)
|
-	ntfs_memdup(x, y)
+	kmemdup(x, y, GFP_NOFS)
)

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2021-08-27 17:05:12 +03:00
..
lib fs/ntfs3: Fix various spelling mistakes 2021-08-27 17:04:45 +03:00
attrib.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
attrlist.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
bitfunc.c fs/ntfs3: Add bitmap 2021-08-13 07:55:41 -07:00
bitmap.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
debug.h fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
dir.c fs/ntfs3: Add file operations and implementation 2021-08-13 07:55:49 -07:00
file.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
frecord.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
fslog.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
fsntfs.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
index.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
inode.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
Kconfig fs/ntfs3: Add Kconfig, Makefile and doc 2021-08-13 07:56:37 -07:00
lznt.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
Makefile fs/ntfs3: Add Kconfig, Makefile and doc 2021-08-13 07:56:37 -07:00
namei.c fs/ntfs3: Use kernel ALIGN macros over driver specific 2021-08-27 17:05:12 +03:00
ntfs_fs.h fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
ntfs.h fs/ntfs3: Use kernel ALIGN macros over driver specific 2021-08-27 17:05:12 +03:00
record.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
run.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
super.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00
upcase.c fs/ntfs3: Fix various spelling mistakes 2021-08-27 17:04:45 +03:00
xattr.c fs/ntfs3: Do not use driver own alloc wrappers 2021-08-27 17:05:12 +03:00