aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2012-04-18 04:27:16 -0400
committerDavid Sterba <dsterba@suse.cz>2012-04-18 13:22:33 -0400
commitb9688bb8459b67e42327de6420edb405a9188775 (patch)
tree90f1b5be9f4829463082e24357f5c9a5677797f3 /fs/btrfs/extent-tree.c
parent253beebd5a255e07d6a8b65515491f33664e82a2 (diff)
btrfs: don't return EINTR
It is basically a good thing if we are interruptible when waiting for free space, but the generality in which it is implemented currently leads to system calls being interruptible that are not documented this way. For example git can't handle interrupted unlink(), leading to corrupt repos under space pressure. Instead we raise the bar to only be interruptible by SIGKILL. Thanks to David Sterba for suggesting this. Signed-off-by: Arne Jansen <sensille@gmx.net>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a0bb9dcd3c36..84497f8eb043 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3771,13 +3771,10 @@ again:
3771 */ 3771 */
3772 if (current->journal_info) 3772 if (current->journal_info)
3773 return -EAGAIN; 3773 return -EAGAIN;
3774 ret = wait_event_interruptible(space_info->wait, 3774 ret = wait_event_killable(space_info->wait, !space_info->flush);
3775 !space_info->flush); 3775 /* Must have been killed, return */
3776 /* Must have been interrupted, return */ 3776 if (ret)
3777 if (ret) {
3778 printk(KERN_DEBUG "btrfs: %s returning -EINTR\n", __func__);
3779 return -EINTR; 3777 return -EINTR;
3780 }
3781 3778
3782 spin_lock(&space_info->lock); 3779 spin_lock(&space_info->lock);
3783 } 3780 }