diff options
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/aops.c | 2 | ||||
-rw-r--r-- | fs/ntfs/compress.c | 2 | ||||
-rw-r--r-- | fs/ntfs/mft.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index 00e9ccde8e42..b38f944f0667 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
@@ -1194,7 +1194,7 @@ lock_retry_remap: | |||
1194 | tbh = bhs[i]; | 1194 | tbh = bhs[i]; |
1195 | if (!tbh) | 1195 | if (!tbh) |
1196 | continue; | 1196 | continue; |
1197 | if (unlikely(test_set_buffer_locked(tbh))) | 1197 | if (!trylock_buffer(tbh)) |
1198 | BUG(); | 1198 | BUG(); |
1199 | /* The buffer dirty state is now irrelevant, just clean it. */ | 1199 | /* The buffer dirty state is now irrelevant, just clean it. */ |
1200 | clear_buffer_dirty(tbh); | 1200 | clear_buffer_dirty(tbh); |
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index 33ff314cc507..9669541d0119 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c | |||
@@ -665,7 +665,7 @@ lock_retry_remap: | |||
665 | for (i = 0; i < nr_bhs; i++) { | 665 | for (i = 0; i < nr_bhs; i++) { |
666 | struct buffer_head *tbh = bhs[i]; | 666 | struct buffer_head *tbh = bhs[i]; |
667 | 667 | ||
668 | if (unlikely(test_set_buffer_locked(tbh))) | 668 | if (!trylock_buffer(tbh)) |
669 | continue; | 669 | continue; |
670 | if (unlikely(buffer_uptodate(tbh))) { | 670 | if (unlikely(buffer_uptodate(tbh))) { |
671 | unlock_buffer(tbh); | 671 | unlock_buffer(tbh); |
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 790defb847e7..17d32ca6bc35 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c | |||
@@ -586,7 +586,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, | |||
586 | for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) { | 586 | for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) { |
587 | struct buffer_head *tbh = bhs[i_bhs]; | 587 | struct buffer_head *tbh = bhs[i_bhs]; |
588 | 588 | ||
589 | if (unlikely(test_set_buffer_locked(tbh))) | 589 | if (!trylock_buffer(tbh)) |
590 | BUG(); | 590 | BUG(); |
591 | BUG_ON(!buffer_uptodate(tbh)); | 591 | BUG_ON(!buffer_uptodate(tbh)); |
592 | clear_buffer_dirty(tbh); | 592 | clear_buffer_dirty(tbh); |
@@ -779,7 +779,7 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync) | |||
779 | for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) { | 779 | for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) { |
780 | struct buffer_head *tbh = bhs[i_bhs]; | 780 | struct buffer_head *tbh = bhs[i_bhs]; |
781 | 781 | ||
782 | if (unlikely(test_set_buffer_locked(tbh))) | 782 | if (!trylock_buffer(tbh)) |
783 | BUG(); | 783 | BUG(); |
784 | BUG_ON(!buffer_uptodate(tbh)); | 784 | BUG_ON(!buffer_uptodate(tbh)); |
785 | clear_buffer_dirty(tbh); | 785 | clear_buffer_dirty(tbh); |