Skip to contentSkip to conversation

mm-shmem-support-fs_ioc_etflags-in-tmpfs.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 30, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs
has been removed from the -mm tree. Its filename was
mm-shmem-support-fs_ioc_etflags-in-tmpfs.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Theodore Ts'o" <[email protected]>
Subject: mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs
Date: Thu, 14 Jul 2022 21:59:12 -0400

This allows userspace to set flags like FS_APPEND_FL, FS_IMMUTABLE_FL, FS_NODUMP_FL, etc., like all other standard Linux file systems.

---

 include/linux/shmem_fs.h |   11 ++++++
 mm/shmem.c               |   64 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 74 insertions(+), 1 deletion(-)
include/linux/shmem_fs.h renamed from include/linux/shmem_fs.h~mm-shmem-support-fs_ioc_etflags-in-tmpfs +11 -0
@@ -25,9 +25,20 @@ struct shmem_inode_info {
 	struct simple_xattrs	xattrs;		/* list of xattrs */
 	atomic_t		stop_eviction;	/* hold when working on inode */
 	struct timespec64	i_crtime;	/* file creation time */
+	unsigned int		fsflags;	/* flags for FS_IOC_[SG]ETFLAGS */
 	struct inode		vfs_inode;
 };
 
+#define SHMEM_FL_USER_VISIBLE FS_FL_USER_VISIBLE
+#define SHMEM_FL_USER_MODIFIABLE FS_FL_USER_MODIFIABLE
+#define SHMEM_FL_INHERITED FS_FL_USER_MODIFIABLE
+
+/* Flags that are appropriate for regular files (all but dir-specific ones). */
+#define SHMEM_REG_FLMASK (~(FS_DIRSYNC_FL | FS_TOPDIR_FL))
+
+/* Flags that are appropriate for non-directories/regular files. */
+#define SHMEM_OTHER_FLMASK (FS_NODUMP_FL | FS_NOATIME_FL)
+
 struct shmem_sb_info {
 	unsigned long max_blocks;   /* How many blocks are allowed */
 	struct percpu_counter used_blocks;  /* How many are allocated */
mm/shmem.c renamed from mm/shmem.c~mm-shmem-support-fs_ioc_etflags-in-tmpfs +63 -1

106 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are