Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96383
b: refs/heads/master
c: c3921ab
h: refs/heads/master
i:
  96381: 4c308bc
  96379: 6606361
  96375: 7e6d6c7
  96367: 30d358c
  96351: b2153dd
  96319: efa4e8a
  96255: 3cbcae6
v: v3
  • Loading branch information
Linus Torvalds committed May 11, 2008
1 parent a1b6007 commit 1fe4752
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9662369786b9d07fd46d65b0f9e3938a3e01a5d9
refs/heads/master: c3921ab71507b108d51a0f1ee960f80cd668a93d
2 changes: 1 addition & 1 deletion trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
* give it the opportunity to lock the file.
*/
if (found)
cond_resched();
cond_resched_bkl();

find_conflict:
for_each_lock(inode, before) {
Expand Down
6 changes: 5 additions & 1 deletion trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2037,20 +2037,24 @@ static inline int need_resched(void)
* cond_resched_lock() will drop the spinlock before scheduling,
* cond_resched_softirq() will enable bhs before scheduling.
*/
extern int _cond_resched(void);
#ifdef CONFIG_PREEMPT
static inline int cond_resched(void)
{
return 0;
}
#else
extern int _cond_resched(void);
static inline int cond_resched(void)
{
return _cond_resched();
}
#endif
extern int cond_resched_lock(spinlock_t * lock);
extern int cond_resched_softirq(void);
static inline int cond_resched_bkl(void)
{
return _cond_resched();
}

/*
* Does a critical section need to be broken due to another
Expand Down
2 changes: 0 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5525,7 +5525,6 @@ static void __cond_resched(void)
} while (need_resched());
}

#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PREEMPT_VOLUNTARY)
int __sched _cond_resched(void)
{
if (need_resched() && !(preempt_count() & PREEMPT_ACTIVE) &&
Expand All @@ -5536,7 +5535,6 @@ int __sched _cond_resched(void)
return 0;
}
EXPORT_SYMBOL(_cond_resched);
#endif

/*
* cond_resched_lock() - if a reschedule is pending, drop the given lock,
Expand Down

0 comments on commit 1fe4752

Please sign in to comment.