Skip to contentSkip to conversation

ramfs-support-o_tmpfile.patch removed from -mm tree

merged [email protected] 1 participant 1 message Feb 25, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: ramfs: support O_TMPFILE
has been removed from the -mm tree. Its filename was
ramfs-support-o_tmpfile.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Alexey Dobriyan <[email protected]>
Subject: ramfs: support O_TMPFILE

---

 fs/ramfs/inode.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
fs/ramfs/inode.c renamed from fs/ramfs/inode.c~ramfs-support-o_tmpfile +13 -0
@@ -151,6 +151,18 @@ static int ramfs_symlink(struct user_nam
 	return error;
 }
 
+static int ramfs_tmpfile(struct user_namespace *mnt_userns,
+			 struct inode *dir, struct dentry *dentry, umode_t mode)
+{
+	struct inode *inode;
+
+	inode = ramfs_get_inode(dir->i_sb, dir, mode, 0);
+	if (!inode)
+		return -ENOSPC;
+	d_tmpfile(dentry, inode);
+	return 0;
+}
+
 static const struct inode_operations ramfs_dir_inode_operations = {
 	.create		= ramfs_create,
 	.lookup		= simple_lookup,
@@ -161,6 +173,7 @@ static const struct inode_operations ram
 	.rmdir		= simple_rmdir,
 	.mknod		= ramfs_mknod,
 	.rename		= simple_rename,
+	.tmpfile	= ramfs_tmpfile,
 };
 
 /*

_

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