Skip to content

Commit

Permalink
kill bogus BUG_ON() in do_close_on_exec()
Browse files Browse the repository at this point in the history
It can be legitimately triggered via procfs access.  Now, at least
2 of 3 of get_files_struct() callers in procfs are useless, but
when and if we get rid of those we can always add WARN_ON() here.
BUG_ON() at that spot is simply wrong.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Nov 12, 2012
1 parent a736427 commit 5a84776
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ void do_close_on_exec(struct files_struct *files)
struct fdtable *fdt;

/* exec unshares first */
BUG_ON(atomic_read(&files->count) != 1);
spin_lock(&files->file_lock);
for (i = 0; ; i++) {
unsigned long set;
Expand Down

0 comments on commit 5a84776

Please sign in to comment.