Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96393
b: refs/heads/master
c: 5701412
h: refs/heads/master
i:
  96391: 50fe666
v: v3
  • Loading branch information
Linus Torvalds committed May 12, 2008
1 parent 9d4041f commit dc6bc83
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: ae429083efe996ca2c569c44fd6fea440676dc33
refs/heads/master: 57014123512633ab0c38a4fea4140bf156f6a3a0
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 dc6bc83

Please sign in to comment.