Skip to content

Commit

Permalink
vfs: abort dedupe loop if fatal signals are pending
Browse files Browse the repository at this point in the history
If the program running dedupe receives a fatal signal during the
dedupe loop, we should bail out to avoid tying up the system.

Signed-off-by: Darrick J. Wong <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
djwong authored and Al Viro committed Jan 23, 2016
1 parent 3ed47db commit e62e560
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,9 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same)
mnt_drop_write_file(dst_file);
next_loop:
fdput(dst_fd);

if (fatal_signal_pending(current))
goto out;
}

out:
Expand Down

0 comments on commit e62e560

Please sign in to comment.