Skip to content

Commit

Permalink
fs/: remove caller signal_pending branch predictions
Browse files Browse the repository at this point in the history
This is already done for us internally by the signal machinery.

[[email protected]: fix fs/buffer.c]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Davidlohr Bueso authored and torvalds committed Jan 4, 2019
1 parent fa45f11 commit 08d405c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fs/afs/fs_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ int afs_wait_for_fs_probes(struct afs_server_list *slist, unsigned long untried)
}
}

if (!still_probing || unlikely(signal_pending(current)))
if (!still_probing || signal_pending(current))
goto stop;
schedule();
}
Expand Down
2 changes: 1 addition & 1 deletion fs/afs/vl_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int afs_wait_for_vl_probes(struct afs_vlserver_list *vllist,
}
}

if (!still_probing || unlikely(signal_pending(current)))
if (!still_probing || signal_pending(current))
goto stop;
schedule();
}
Expand Down
2 changes: 1 addition & 1 deletion fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,

balance_dirty_pages_ratelimited(mapping);

if (unlikely(fatal_signal_pending(current))) {
if (fatal_signal_pending(current)) {
err = -EINTR;
goto out;
}
Expand Down
4 changes: 2 additions & 2 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ static int de_thread(struct task_struct *tsk)
__set_current_state(TASK_KILLABLE);
spin_unlock_irq(lock);
schedule();
if (unlikely(__fatal_signal_pending(tsk)))
if (__fatal_signal_pending(tsk))
goto killed;
spin_lock_irq(lock);
}
Expand Down Expand Up @@ -1115,7 +1115,7 @@ static int de_thread(struct task_struct *tsk)
write_unlock_irq(&tasklist_lock);
cgroup_threadgroup_change_end(tsk);
schedule();
if (unlikely(__fatal_signal_pending(tsk)))
if (__fatal_signal_pending(tsk))
goto killed;
}

Expand Down
2 changes: 1 addition & 1 deletion fs/orangefs/orangefs-bufmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int wait_for_free(struct slot_map *m)
left = t;
else
left = t + (left - n);
if (unlikely(signal_pending(current)))
if (signal_pending(current))
left = -EINTR;
} while (left > 0);

Expand Down

0 comments on commit 08d405c

Please sign in to comment.