diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 0b211cba190..fa47e43b8b4 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -675,7 +675,7 @@ xfs_probe_cluster(  			} else  				pg_offset = PAGE_CACHE_SIZE; -			if (page->index == tindex && !TestSetPageLocked(page)) { +			if (page->index == tindex && trylock_page(page)) {  				pg_len = xfs_probe_page(page, pg_offset, mapped);  				unlock_page(page);  			} @@ -759,7 +759,7 @@ xfs_convert_page(  	if (page->index != tindex)  		goto fail; -	if (TestSetPageLocked(page)) +	if (!trylock_page(page))  		goto fail;  	if (PageWriteback(page))  		goto fail_unlock_page; @@ -1104,7 +1104,7 @@ xfs_page_state_convert(  			 * that we are writing into for the first time.  			 */  			type = IOMAP_NEW; -			if (!test_and_set_bit(BH_Lock, &bh->b_state)) { +			if (trylock_buffer(bh)) {  				ASSERT(buffer_mapped(bh));  				if (iomap_valid)  					all_bh = 1;  |