Skip to content

Commit

Permalink
ubifs: Remove obsolete TODO from dfs_file_write()
Browse files Browse the repository at this point in the history
AFAICT this kind of problems are no longer possible since
debugfs gained file removal protection via
e9117a5 ("debugfs: implement per-file removal protection").

Cc: Christoph Hellwig <hch@lst.de>
Cc: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Richard Weinberger committed Nov 17, 2019
1 parent 0997187 commit b27b281
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions fs/ubifs/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -2737,18 +2737,6 @@ static ssize_t dfs_file_write(struct file *file, const char __user *u,
struct dentry *dent = file->f_path.dentry;
int val;

/*
* TODO: this is racy - the file-system might have already been
* unmounted and we'd oops in this case. The plan is to fix it with
* help of 'iterate_supers_type()' which we should have in v3.0: when
* a debugfs opened, we rember FS's UUID in file->private_data. Then
* whenever we access the FS via a debugfs file, we iterate all UBIFS
* superblocks and fine the one with the same UUID, and take the
* locking right.
*
* The other way to go suggested by Al Viro is to create a separate
* 'ubifs-debug' file-system instead.
*/
if (file->f_path.dentry == d->dfs_dump_lprops) {
ubifs_dump_lprops(c);
return count;
Expand Down

0 comments on commit b27b281

Please sign in to comment.