[Concept,21/23] ext4l: Move PF_MEMALLOC flags to linux/sched.h
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Move the process flags (PF_MEMALLOC, PF_MEMALLOC_NOFS) to
include/linux/sched.h where they belong with other task_struct-related
definitions, matching Linux kernel organisation.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
fs/ext4l/ext4_uboot.h | 8 ++------
include/linux/sched.h | 4 ++++
2 files changed, 6 insertions(+), 6 deletions(-)
@@ -493,8 +493,7 @@ static inline int bdev_read_only(struct block_device *bdev)
/* Forward declaration for swap */
struct swap_info_struct;
-/* Process flags */
-#define PF_MEMALLOC 0x00000800
+/* PF_MEMALLOC is in linux/sched.h */
/* Forward declarations for inode operations */
struct inode_operations;
@@ -1354,10 +1353,7 @@ static inline void super_set_uuid(struct super_block *sb, const u8 *uuid,
/* Nested inode locking stub */
#define inode_lock_nested(i, c) do { (void)(i); (void)(c); } while (0)
-/* Process flags */
-#ifndef PF_MEMALLOC_NOFS
-#define PF_MEMALLOC_NOFS 0x00040000
-#endif
+/* PF_MEMALLOC_NOFS is in linux/sched.h */
/* generic_set_sb_d_ops, d_make_root are now in linux/dcache.h */
@@ -16,6 +16,10 @@ struct io_context {
unsigned int ioprio;
};
+/* Process flags */
+#define PF_MEMALLOC 0x00000800 /* Allocating memory */
+#define PF_MEMALLOC_NOFS 0x00040000 /* GFP_NOFS allocations */
+
struct task_struct {
int pid;
char comm[16];