Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161214
b: refs/heads/master
c: d62f843
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Sep 11, 2009
1 parent e8855f8 commit 9dbdbf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 1b379d8daf4e981b2220f057683e35af022d45bc
refs/heads/master: d62f843b295393124970d29316344150c7de009b
11 changes: 9 additions & 2 deletions trunk/include/linux/blk-iopoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ enum {
IOPOLL_F_DISABLE = 1,
};

/*
* Returns 0 if we successfully set the IOPOLL_F_SCHED bit, indicating
* that we were the first to acquire this iop for scheduling. If this iop
* is currently disabled, return "failure".
*/
static inline int blk_iopoll_sched_prep(struct blk_iopoll *iop)
{
return !test_bit(IOPOLL_F_DISABLE, &iop->state) &&
!test_and_set_bit(IOPOLL_F_SCHED, &iop->state);
if (!test_bit(IOPOLL_F_DISABLE, &iop->state))
return test_and_set_bit(IOPOLL_F_SCHED, &iop->state);

return 1;
}

static inline int blk_iopoll_disable_pending(struct blk_iopoll *iop)
Expand Down

0 comments on commit 9dbdbf3

Please sign in to comment.