diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 4dbe52948e8f..38653e36e225 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1720,7 +1720,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1720 | */ | 1720 | */ |
1721 | if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) { | 1721 | if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) { |
1722 | lock_buffer(bh); | 1722 | lock_buffer(bh); |
1723 | } else if (test_set_buffer_locked(bh)) { | 1723 | } else if (!trylock_buffer(bh)) { |
1724 | redirty_page_for_writepage(wbc, page); | 1724 | redirty_page_for_writepage(wbc, page); |
1725 | continue; | 1725 | continue; |
1726 | } | 1726 | } |
@@ -3000,7 +3000,7 @@ void ll_rw_block(int rw, int nr, struct buffer_head *bhs[]) | |||
3000 | 3000 | ||
3001 | if (rw == SWRITE || rw == SWRITE_SYNC) | 3001 | if (rw == SWRITE || rw == SWRITE_SYNC) |
3002 | lock_buffer(bh); | 3002 | lock_buffer(bh); |
3003 | else if (test_set_buffer_locked(bh)) | 3003 | else if (!trylock_buffer(bh)) |
3004 | continue; | 3004 | continue; |
3005 | 3005 | ||
3006 | if (rw == WRITE || rw == SWRITE || rw == SWRITE_SYNC) { | 3006 | if (rw == WRITE || rw == SWRITE || rw == SWRITE_SYNC) { |