Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1527a3a
fuse_ctl_add_conn(): fix nlink breakage in case of early failure
Nov 18, 2025
f34237c
tracefs: fix a leak in eventfs_create_events_dir()
Nov 18, 2025
a6a6d7e
new helper: simple_remove_by_name()
Nov 18, 2025
b812488
new helper: simple_done_creating()
Nov 18, 2025
118d360
introduce a flag for explicitly marking persistently pinned dentries
Nov 18, 2025
8b9a376
primitives for maintaining persisitency
Nov 18, 2025
1c42cc4
convert simple_{link,unlink,rmdir,rename,fill_super}() to new primitives
Nov 18, 2025
04953df
convert ramfs and tmpfs
Nov 18, 2025
b1a7de2
procfs: make /self and /thread_self dentries persistent
Nov 18, 2025
8cd6e13
configfs, securityfs: kill_litter_super() not needed
Nov 18, 2025
f5b2696
convert xenfs
Nov 18, 2025
301c543
convert smackfs
Nov 18, 2025
9b304b2
convert hugetlbfs
Nov 18, 2025
c2bed6f
convert mqueue
Nov 18, 2025
619f29b
convert bpf
Nov 18, 2025
05d33b7
convert dlmfs
Nov 18, 2025
3a227a5
convert fuse_ctl
Nov 18, 2025
a5f7c7c
convert pstore
Nov 18, 2025
02fcd29
convert tracefs
Nov 18, 2025
eefe7be
convert debugfs
Nov 18, 2025
af7978b
debugfs: remove duplicate checks in callers of start_creating()
Nov 18, 2025
9815dd3
convert efivarfs
Nov 18, 2025
ff55b76
convert spufs
Nov 18, 2025
5f7b198
convert ibmasmfs
Nov 18, 2025
b93fb2c
ibmasmfs: get rid of ibmasmfs_dir_ops
Nov 18, 2025
58f5293
convert devpts
Nov 18, 2025
5bace84
binderfs: use simple_start_creating()
Nov 18, 2025
c6d954a
binderfs_binder_ctl_create(): kill a bogus check
Nov 18, 2025
78fb8a6
convert binderfs
Nov 18, 2025
74e76f1
autofs_{rmdir,unlink}: dentry->d_fsdata->dentry == dentry there
Nov 18, 2025
5c51625
convert autofs
Nov 18, 2025
8b0eee1
convert binfmt_misc
Nov 18, 2025
1acee37
selinuxfs: don't stash the dentry of /policy_capabilities
Nov 18, 2025
19df9e1
selinuxfs: new helper for attaching files to tree
Nov 18, 2025
0e2b93b
convert selinuxfs
Nov 18, 2025
6390795
functionfs: don't abuse ffs_data_closed() on fs shutdown
Nov 18, 2025
52186ba
functionfs: don't bother with ffs->ref in ffs_data_{opened,closed}()
Nov 18, 2025
e4e5e1d
functionfs: need to cancel ->reset_work in ->kill_sb()
Nov 18, 2025
3dde9e2
functionfs: fix the open/removal races
Nov 18, 2025
b1b8500
functionfs: switch to simple_remove_by_name()
Nov 18, 2025
626cc51
convert functionfs
Nov 18, 2025
450e247
gadgetfs: switch to simple_remove_by_name()
Nov 18, 2025
7936322
convert gadgetfs
Nov 18, 2025
1657c55
hypfs: don't pin dentries twice
Nov 18, 2025
a4f0093
hypfs: switch hypfs_create_str() to returning int
Nov 18, 2025
f70ceaf
hypfs: swich hypfs_create_u64() to returning int
Nov 18, 2025
1c0d8b4
convert hypfs
Nov 18, 2025
837b346
convert rpc_pipefs
Nov 18, 2025
1e85286
convert nfsctl
Nov 18, 2025
ab2c497
convert rust_binderfs
Nov 18, 2025
88bf2b9
get rid of kill_litter_super()
Nov 18, 2025
ac2a1a3
convert securityfs
Nov 18, 2025
cebff17
kill securityfs_recursive_remove()
Nov 18, 2025
4c1aade
d_make_discardable(): warn if given a non-persistent dentry
Nov 18, 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).
17 changes: 7 additions & 10 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));
inc_nlink(inode);
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