History

simple_recursive_removal(): kernel-side rm -rf for ramfs-style filesystems

two requirements: no file creations in IS_DEADDIR and no cross-directory renames whatsoever.

Al Viro committed 6 years ago

Commit a3d1e7e1 parent e42617b9 files · +104 −218Browse files

Showing the changes to include/linux (3 of 9 files). Show all

Unified · Split

3 files
  1. include/linux/debugfs.h +1 −1
  2. include/linux/fs.h +2 −0
  3. include/linux/tracefs.h +0 −1
include/linux/debugfs.h+1−1
@@ -83,7 +83,7 @@ struct dentry *debugfs_create_automount(const char *name, · 82 unmodified lines
83 void *data);83 void *data);
84 84
85void debugfs_remove(struct dentry *dentry);85void debugfs_remove(struct dentry *dentry);
86void debugfs_remove_recursive(struct dentry *dentry);86#define debugfs_remove_recursive debugfs_remove
87 87
88const struct file_operations *debugfs_real_fops(const struct file *filp);88const struct file_operations *debugfs_real_fops(const struct file *filp);
89 89
include/linux/fs.h+2−0
@@ -3303,6 +3303,8 @@ extern int simple_unlink(struct inode *, struct dentry *); · 3302 unmodified lines
3303extern int simple_rmdir(struct inode *, struct dentry *);3303extern int simple_rmdir(struct inode *, struct dentry *);
3304extern int simple_rename(struct inode *, struct dentry *,3304extern int simple_rename(struct inode *, struct dentry *,
3305 struct inode *, struct dentry *, unsigned int);3305 struct inode *, struct dentry *, unsigned int);
3306extern void simple_recursive_removal(struct dentry *,
3307 void (*callback)(struct dentry *));
3306extern int noop_fsync(struct file *, loff_t, loff_t, int);3308extern int noop_fsync(struct file *, loff_t, loff_t, int);
3307extern int noop_set_page_dirty(struct page *page);3309extern int noop_set_page_dirty(struct page *page);
3308extern void noop_invalidatepage(struct page *page, unsigned int offset,3310extern void noop_invalidatepage(struct page *page, unsigned int offset,
include/linux/tracefs.h+0−1
@@ -28,7 +28,6 @@ struct dentry *tracefs_create_file(const char *name, umode_t mode, · 27 unmodified lines
28struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);28struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
29 29
30void tracefs_remove(struct dentry *dentry);30void tracefs_remove(struct dentry *dentry);
31void tracefs_remove_recursive(struct dentry *dentry);
32 31
33struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,32struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
34 int (*mkdir)(const char *name),33 int (*mkdir)(const char *name),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t