diff options
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r-- | include/linux/buffer_head.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 82aa36c53ea7..eadaab44015f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -115,7 +115,6 @@ BUFFER_FNS(Uptodate, uptodate) | |||
115 | BUFFER_FNS(Dirty, dirty) | 115 | BUFFER_FNS(Dirty, dirty) |
116 | TAS_BUFFER_FNS(Dirty, dirty) | 116 | TAS_BUFFER_FNS(Dirty, dirty) |
117 | BUFFER_FNS(Lock, locked) | 117 | BUFFER_FNS(Lock, locked) |
118 | TAS_BUFFER_FNS(Lock, locked) | ||
119 | BUFFER_FNS(Req, req) | 118 | BUFFER_FNS(Req, req) |
120 | TAS_BUFFER_FNS(Req, req) | 119 | TAS_BUFFER_FNS(Req, req) |
121 | BUFFER_FNS(Mapped, mapped) | 120 | BUFFER_FNS(Mapped, mapped) |
@@ -205,6 +204,8 @@ void block_invalidatepage(struct page *page, unsigned long offset); | |||
205 | int block_write_full_page(struct page *page, get_block_t *get_block, | 204 | int block_write_full_page(struct page *page, get_block_t *get_block, |
206 | struct writeback_control *wbc); | 205 | struct writeback_control *wbc); |
207 | int block_read_full_page(struct page*, get_block_t*); | 206 | int block_read_full_page(struct page*, get_block_t*); |
207 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, | ||
208 | unsigned long from); | ||
208 | int block_write_begin(struct file *, struct address_space *, | 209 | int block_write_begin(struct file *, struct address_space *, |
209 | loff_t, unsigned, unsigned, | 210 | loff_t, unsigned, unsigned, |
210 | struct page **, void **, get_block_t*); | 211 | struct page **, void **, get_block_t*); |
@@ -319,10 +320,15 @@ static inline void wait_on_buffer(struct buffer_head *bh) | |||
319 | __wait_on_buffer(bh); | 320 | __wait_on_buffer(bh); |
320 | } | 321 | } |
321 | 322 | ||
323 | static inline int trylock_buffer(struct buffer_head *bh) | ||
324 | { | ||
325 | return likely(!test_and_set_bit(BH_Lock, &bh->b_state)); | ||
326 | } | ||
327 | |||
322 | static inline void lock_buffer(struct buffer_head *bh) | 328 | static inline void lock_buffer(struct buffer_head *bh) |
323 | { | 329 | { |
324 | might_sleep(); | 330 | might_sleep(); |
325 | if (test_set_buffer_locked(bh)) | 331 | if (!trylock_buffer(bh)) |
326 | __lock_buffer(bh); | 332 | __lock_buffer(bh); |
327 | } | 333 | } |
328 | 334 | ||