Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
da4271a
fuse_ctl_add_conn(): fix nlink breakage in case of early failure
Oct 28, 2025
5d740e7
tracefs: fix a leak in eventfs_create_events_dir()
Oct 28, 2025
83d2ff1
new helper: simple_remove_by_name()
Oct 28, 2025
feab693
new helper: simple_done_creating()
Oct 28, 2025
0c282b0
introduce a flag for explicitly marking persistently pinned dentries
Oct 28, 2025
951563f
primitives for maintaining persisitency
Oct 28, 2025
2a080d5
convert simple_{link,unlink,rmdir,rename,fill_super}() to new primitives
Oct 28, 2025
b4c4179
convert ramfs and tmpfs
Oct 28, 2025
8c0860f
procfs: make /self and /thread_self dentries persistent
Oct 28, 2025
e5e9e39
configfs, securityfs: kill_litter_super() not needed
Oct 28, 2025
7c41284
convert xenfs
Oct 28, 2025
89f3c48
convert smackfs
Oct 28, 2025
c91602f
convert hugetlbfs
Oct 28, 2025
fd9b3e6
convert mqueue
Oct 28, 2025
470e9fe
convert bpf
Oct 28, 2025
fc26d53
convert dlmfs
Oct 28, 2025
1905094
convert fuse_ctl
Oct 28, 2025
965aaa9
convert pstore
Oct 28, 2025
f66517f
convert tracefs
Oct 28, 2025
d7be43e
convert debugfs
Oct 28, 2025
d5bfee3
debugfs: remove duplicate checks in callers of start_creating()
Oct 28, 2025
8dae3b6
convert efivarfs
Oct 28, 2025
9188342
convert spufs
Oct 28, 2025
9718d57
convert ibmasmfs
Oct 28, 2025
053c571
ibmasmfs: get rid of ibmasmfs_dir_ops
Oct 28, 2025
e3320b4
convert devpts
Oct 28, 2025
4f5b132
binderfs: use simple_start_creating()
Oct 28, 2025
9368ec8
binderfs_binder_ctl_create(): kill a bogus check
Oct 28, 2025
a88bf35
convert binderfs
Oct 28, 2025
4910b1d
autofs_{rmdir,unlink}: dentry->d_fsdata->dentry == dentry there
Oct 28, 2025
060203a
convert autofs
Oct 28, 2025
856fad4
convert binfmt_misc
Oct 28, 2025
9350a4c
selinuxfs: don't stash the dentry of /policy_capabilities
Oct 28, 2025
d1cc941
selinuxfs: new helper for attaching files to tree
Oct 28, 2025
160d2cd
convert selinuxfs
Oct 28, 2025
66b1070
functionfs: switch to simple_remove_by_name()
Oct 28, 2025
353bda4
convert functionfs
Oct 28, 2025
ec1109a
gadgetfs: switch to simple_remove_by_name()
Oct 28, 2025
e7aca65
convert gadgetfs
Oct 28, 2025
f1262fd
hypfs: don't pin dentries twice
Oct 28, 2025
724ed68
hypfs: switch hypfs_create_str() to returning int
Oct 28, 2025
a6eee05
hypfs: swich hypfs_create_u64() to returning int
Oct 28, 2025
fe83636
convert hypfs
Oct 28, 2025
001ad87
convert rpc_pipefs
Oct 28, 2025
b2264a5
convert nfsctl
Oct 28, 2025
2529981
convert rust_binderfs
Oct 28, 2025
2290151
get rid of kill_litter_super()
Oct 28, 2025
558154d
convert securityfs
Oct 28, 2025
70dbedf
kill securityfs_recursive_remove()
Oct 28, 2025
cfb3833
d_make_discardable(): warn if given a non-persistent dentry
Oct 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Documentation/filesystems/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1309,3 +1309,10 @@ a different length, use
vfs_parse_fs_qstr(fc, key, &QSTR_LEN(value, len))

instead.

---

**mandatory**

kill_litter_super() is gone; convert to DCACHE_PERSISTENT use (as all
in-tree filesystems have done).
15 changes: 6 additions & 9 deletions arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry,
inode->i_fop = fops;
inode->i_size = size;
inode->i_private = SPUFS_I(inode)->i_ctx = get_spu_context(ctx);
d_add(dentry, inode);
d_make_persistent(dentry, inode);
out:
return ret;
}
Expand Down Expand Up @@ -163,10 +163,9 @@ static int spufs_fill_dir(struct dentry *dir,
return -ENOMEM;
ret = spufs_new_file(dir->d_sb, dentry, files->ops,
files->mode & mode, files->size, ctx);
if (ret) {
dput(dentry);
dput(dentry);
if (ret)
return ret;
}
files++;
}
return 0;
Expand Down Expand Up @@ -241,11 +240,10 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,

inode_lock(inode);

dget(dentry);
inc_nlink(dir);
inc_nlink(inode);

d_instantiate(dentry, inode);
d_make_persistent(dentry, inode);

if (flags & SPU_CREATE_NOSCHED)
ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents,
Expand Down Expand Up @@ -479,10 +477,9 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode)
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;

d_instantiate(dentry, inode);
dget(dentry);
inc_nlink(dir);
inc_nlink(d_inode(dentry));
d_make_persistent(dentry, inode);
return ret;

out_iput:
Expand Down Expand Up @@ -780,7 +777,7 @@ static struct file_system_type spufs_type = {
.name = "spufs",
.init_fs_context = spufs_init_fs_context,
.parameters = spufs_fs_parameters,
.kill_sb = kill_litter_super,
.kill_sb = kill_anon_super,
};
MODULE_ALIAS_FS("spufs");

Expand Down
6 changes: 2 additions & 4 deletions arch/s390/hypfs/hypfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

extern struct dentry *hypfs_mkdir(struct dentry *parent, const char *name);

extern struct dentry *hypfs_create_u64(struct dentry *dir, const char *name,
__u64 value);
extern int hypfs_create_u64(struct dentry *dir, const char *name, __u64 value);

extern struct dentry *hypfs_create_str(struct dentry *dir, const char *name,
char *string);
extern int hypfs_create_str(struct dentry *dir, const char *name, char *string);

/* LPAR Hypervisor */
extern int hypfs_diag_init(void);
Expand Down
60 changes: 21 additions & 39 deletions arch/s390/hypfs/hypfs_diag_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static int hypfs_create_cpu_files(struct dentry *cpus_dir, void *cpu_info)
{
struct dentry *cpu_dir;
char buffer[TMP_SIZE];
void *rc;
int rc;

snprintf(buffer, TMP_SIZE, "%d", cpu_info__cpu_addr(diag204_get_info_type(),
cpu_info));
Expand All @@ -214,22 +214,21 @@ static int hypfs_create_cpu_files(struct dentry *cpus_dir, void *cpu_info)
rc = hypfs_create_u64(cpu_dir, "mgmtime",
cpu_info__acc_time(diag204_get_info_type(), cpu_info) -
cpu_info__lp_time(diag204_get_info_type(), cpu_info));
if (IS_ERR(rc))
return PTR_ERR(rc);
if (rc)
return rc;
rc = hypfs_create_u64(cpu_dir, "cputime",
cpu_info__lp_time(diag204_get_info_type(), cpu_info));
if (IS_ERR(rc))
return PTR_ERR(rc);
if (rc)
return rc;
if (diag204_get_info_type() == DIAG204_INFO_EXT) {
rc = hypfs_create_u64(cpu_dir, "onlinetime",
cpu_info__online_time(diag204_get_info_type(),
cpu_info));
if (IS_ERR(rc))
return PTR_ERR(rc);
if (rc)
return rc;
}
diag224_idx2name(cpu_info__ctidx(diag204_get_info_type(), cpu_info), buffer);
rc = hypfs_create_str(cpu_dir, "type", buffer);
return PTR_ERR_OR_ZERO(rc);
return hypfs_create_str(cpu_dir, "type", buffer);
}

static void *hypfs_create_lpar_files(struct dentry *systems_dir, void *part_hdr)
Expand Down Expand Up @@ -264,7 +263,7 @@ static int hypfs_create_phys_cpu_files(struct dentry *cpus_dir, void *cpu_info)
{
struct dentry *cpu_dir;
char buffer[TMP_SIZE];
void *rc;
int rc;

snprintf(buffer, TMP_SIZE, "%i", phys_cpu__cpu_addr(diag204_get_info_type(),
cpu_info));
Expand All @@ -273,11 +272,10 @@ static int hypfs_create_phys_cpu_files(struct dentry *cpus_dir, void *cpu_info)
return PTR_ERR(cpu_dir);
rc = hypfs_create_u64(cpu_dir, "mgmtime",
phys_cpu__mgm_time(diag204_get_info_type(), cpu_info));
if (IS_ERR(rc))
return PTR_ERR(rc);
if (rc)
return rc;
diag224_idx2name(phys_cpu__ctidx(diag204_get_info_type(), cpu_info), buffer);
rc = hypfs_create_str(cpu_dir, "type", buffer);
return PTR_ERR_OR_ZERO(rc);
return hypfs_create_str(cpu_dir, "type", buffer);
}

static void *hypfs_create_phys_files(struct dentry *parent_dir, void *phys_hdr)
Expand Down Expand Up @@ -316,41 +314,25 @@ int hypfs_diag_create_files(struct dentry *root)
return rc;

systems_dir = hypfs_mkdir(root, "systems");
if (IS_ERR(systems_dir)) {
rc = PTR_ERR(systems_dir);
goto err_out;
}
if (IS_ERR(systems_dir))
return PTR_ERR(systems_dir);
time_hdr = (struct x_info_blk_hdr *)buffer;
part_hdr = time_hdr + info_blk_hdr__size(diag204_get_info_type());
for (i = 0; i < info_blk_hdr__npar(diag204_get_info_type(), time_hdr); i++) {
part_hdr = hypfs_create_lpar_files(systems_dir, part_hdr);
if (IS_ERR(part_hdr)) {
rc = PTR_ERR(part_hdr);
goto err_out;
}
if (IS_ERR(part_hdr))
return PTR_ERR(part_hdr);
}
if (info_blk_hdr__flags(diag204_get_info_type(), time_hdr) &
DIAG204_LPAR_PHYS_FLG) {
ptr = hypfs_create_phys_files(root, part_hdr);
if (IS_ERR(ptr)) {
rc = PTR_ERR(ptr);
goto err_out;
}
if (IS_ERR(ptr))
return PTR_ERR(ptr);
}
hyp_dir = hypfs_mkdir(root, "hyp");
if (IS_ERR(hyp_dir)) {
rc = PTR_ERR(hyp_dir);
goto err_out;
}
ptr = hypfs_create_str(hyp_dir, "type", "LPAR Hypervisor");
if (IS_ERR(ptr)) {
rc = PTR_ERR(ptr);
goto err_out;
}
rc = 0;

err_out:
return rc;
if (IS_ERR(hyp_dir))
return PTR_ERR(hyp_dir);
return hypfs_create_str(hyp_dir, "type", "LPAR Hypervisor");
}

/* Diagnose 224 functions */
Expand Down
21 changes: 8 additions & 13 deletions arch/s390/hypfs/hypfs_vm_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@

#define ATTRIBUTE(dir, name, member) \
do { \
void *rc; \
rc = hypfs_create_u64(dir, name, member); \
if (IS_ERR(rc)) \
return PTR_ERR(rc); \
int rc = hypfs_create_u64(dir, name, member); \
if (rc) \
return rc; \
} while (0)

static int hypfs_vm_create_guest(struct dentry *systems_dir,
Expand Down Expand Up @@ -85,7 +84,7 @@ static int hypfs_vm_create_guest(struct dentry *systems_dir,

int hypfs_vm_create_files(struct dentry *root)
{
struct dentry *dir, *file;
struct dentry *dir;
struct diag2fc_data *data;
unsigned int count = 0;
int rc, i;
Expand All @@ -100,23 +99,19 @@ int hypfs_vm_create_files(struct dentry *root)
rc = PTR_ERR(dir);
goto failed;
}
file = hypfs_create_str(dir, "type", "z/VM Hypervisor");
if (IS_ERR(file)) {
rc = PTR_ERR(file);
rc = hypfs_create_str(dir, "type", "z/VM Hypervisor");
if (rc)
goto failed;
}

/* physical cpus */
dir = hypfs_mkdir(root, "cpus");
if (IS_ERR(dir)) {
rc = PTR_ERR(dir);
goto failed;
}
file = hypfs_create_u64(dir, "count", data->lcpus);
if (IS_ERR(file)) {
rc = PTR_ERR(file);
rc = hypfs_create_u64(dir, "count", data->lcpus);
if (rc)
goto failed;
}

/* guests */
dir = hypfs_mkdir(root, "systems");
Expand Down
Loading
Loading