shmem_quota: build the object file conditionally to the config option
authorCarlos Maiolino <cem@kernel.org>
Wed, 17 Jul 2024 06:37:27 +0000 (08:37 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:25:45 +0000 (20:25 -0700)
Initially I added shmem-quota to obj-y, move it to the correct place and
remove the unneeded full file #ifdef

Link: https://lkml.kernel.org/r/20240717063737.910840-1-cem@kernel.org
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Suggested-by: Aristeu Rozanski <aris@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/Makefile
mm/shmem_quota.c

index d2915f8c9dc0181978e8e263c0dadbeafffa97ff..b11fefbc13bc6e008553de6d6c231b433710a238 100644 (file)
@@ -53,7 +53,7 @@ obj-y                 := filemap.o mempool.o oom_kill.o fadvise.o \
                           readahead.o swap.o truncate.o vmscan.o shrinker.o \
                           shmem.o util.o mmzone.o vmstat.o backing-dev.o \
                           mm_init.o percpu.o slab_common.o \
-                          compaction.o show_mem.o shmem_quota.o\
+                          compaction.o show_mem.o \
                           interval_tree.o list_lru.o workingset.o \
                           debug.o gup.o mmap_lock.o $(mmu-y)
 
@@ -141,3 +141,4 @@ obj-$(CONFIG_HAVE_BOOTMEM_INFO_NODE) += bootmem_info.o
 obj-$(CONFIG_GENERIC_IOREMAP) += ioremap.o
 obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
 obj-$(CONFIG_EXECMEM) += execmem.o
+obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
index ce514e700d2f65f4b23ae9d579b78790505cc540..d1e32ac01407a5cfaed5aaada6122fd25c5b9c92 100644 (file)
@@ -34,8 +34,6 @@
 #include <linux/quotaops.h>
 #include <linux/quota.h>
 
-#ifdef CONFIG_TMPFS_QUOTA
-
 /*
  * The following constants define the amount of time given a user
  * before the soft limits are treated as hard limits (usually resulting
@@ -351,4 +349,3 @@ const struct dquot_operations shmem_quota_operations = {
        .mark_dirty             = shmem_mark_dquot_dirty,
        .get_next_id            = shmem_get_next_id,
 };
-#endif /* CONFIG_TMPFS_QUOTA */