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
8383 void *data);
8484
8585 void debugfs_remove(struct dentry *dentry);
86−void debugfs_remove_recursive(struct dentry *dentry);
86+#define debugfs_remove_recursive debugfs_remove
8787
8888 const struct file_operations *debugfs_real_fops(const struct file *filp);
8989
include/linux/fs.h+2−0
@@ -3303,6 +3303,8 @@ extern int simple_unlink(struct inode *, struct dentry *); · 3302 unmodified lines
33033303 extern int simple_rmdir(struct inode *, struct dentry *);
33043304 extern int simple_rename(struct inode *, struct dentry *,
33053305 struct inode *, struct dentry *, unsigned int);
3306+extern void simple_recursive_removal(struct dentry *,
3307+ void (*callback)(struct dentry *));
33063308 extern int noop_fsync(struct file *, loff_t, loff_t, int);
33073309 extern int noop_set_page_dirty(struct page *page);
33083310 extern 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
2828 struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
2929
3030 void tracefs_remove(struct dentry *dentry);
31−void tracefs_remove_recursive(struct dentry *dentry);
3231
3332 struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
3433 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