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
1dc8a51
fuse_ctl_add_conn(): fix nlink breakage in case of early failure
Nov 11, 2025
fd88935
tracefs: fix a leak in eventfs_create_events_dir()
Nov 11, 2025
44aa31f
new helper: simple_remove_by_name()
Nov 11, 2025
9c19035
new helper: simple_done_creating()
Nov 11, 2025
0e3b6ef
introduce a flag for explicitly marking persistently pinned dentries
Nov 11, 2025
d8ee376
primitives for maintaining persisitency
Nov 11, 2025
d44ebec
convert simple_{link,unlink,rmdir,rename,fill_super}() to new primitives
Nov 11, 2025
3b661b2
convert ramfs and tmpfs
Nov 11, 2025
4d58f0b
procfs: make /self and /thread_self dentries persistent
Nov 11, 2025
ce15d09
configfs, securityfs: kill_litter_super() not needed
Nov 11, 2025
c2e884f
convert xenfs
Nov 11, 2025
94af7ba
convert smackfs
Nov 11, 2025
5699d32
convert hugetlbfs
Nov 11, 2025
4c588c3
convert mqueue
Nov 11, 2025
d7f1eec
convert bpf
Nov 11, 2025
76f8781
convert dlmfs
Nov 11, 2025
5261768
convert fuse_ctl
Nov 11, 2025
bc2bcea
convert pstore
Nov 11, 2025
b161601
convert tracefs
Nov 11, 2025
46c4f0f
convert debugfs
Nov 11, 2025
8e7495b
debugfs: remove duplicate checks in callers of start_creating()
Nov 11, 2025
02d4cd2
convert efivarfs
Nov 11, 2025
9cd2168
convert spufs
Nov 11, 2025
80da8a1
convert ibmasmfs
Nov 11, 2025
db766e3
ibmasmfs: get rid of ibmasmfs_dir_ops
Nov 11, 2025
25a5d22
convert devpts
Nov 11, 2025
fd49e18
binderfs: use simple_start_creating()
Nov 11, 2025
176f0c8
binderfs_binder_ctl_create(): kill a bogus check
Nov 11, 2025
cbecac9
convert binderfs
Nov 11, 2025
3a40fe7
autofs_{rmdir,unlink}: dentry->d_fsdata->dentry == dentry there
Nov 11, 2025
36a68c2
convert autofs
Nov 11, 2025
1cbe02e
convert binfmt_misc
Nov 11, 2025
dea5110
selinuxfs: don't stash the dentry of /policy_capabilities
Nov 11, 2025
20d7aab
selinuxfs: new helper for attaching files to tree
Nov 11, 2025
f13ca43
convert selinuxfs
Nov 11, 2025
d76e9a3
functionfs: switch to simple_remove_by_name()
Nov 11, 2025
9e06d64
convert functionfs
Nov 11, 2025
46886ac
gadgetfs: switch to simple_remove_by_name()
Nov 11, 2025
6d6a02d
convert gadgetfs
Nov 11, 2025
6686d9e
hypfs: don't pin dentries twice
Nov 11, 2025
20aebdd
hypfs: switch hypfs_create_str() to returning int
Nov 11, 2025
d308369
hypfs: swich hypfs_create_u64() to returning int
Nov 11, 2025
04a4793
convert hypfs
Nov 11, 2025
05438a8
convert rpc_pipefs
Nov 11, 2025
f821cc6
convert nfsctl
Nov 11, 2025
e6427d2
convert rust_binderfs
Nov 11, 2025
038f5b2
get rid of kill_litter_super()
Nov 11, 2025
6ee105c
convert securityfs
Nov 11, 2025
d18407c
kill securityfs_recursive_remove()
Nov 11, 2025
4bf66c2
d_make_discardable(): warn if given a non-persistent dentry
Nov 11, 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