From d221c44b7afefd8f77f8595af468dfacb3b21cc2 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 22 Jun 1999 23:49:01 +0000 Subject: Merge with Linux 2.3.8. --- fs/ext2/truncate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fs/ext2') diff --git a/fs/ext2/truncate.c b/fs/ext2/truncate.c index 75ffaa534..b6f57efb0 100644 --- a/fs/ext2/truncate.c +++ b/fs/ext2/truncate.c @@ -158,7 +158,7 @@ out: } #define DATA_BUFFER_USED(bh) \ - ((bh->b_count > 1) || buffer_locked(bh)) + (bh->b_count || buffer_locked(bh)) static int trunc_direct (struct inode * inode) { @@ -177,12 +177,11 @@ static int trunc_direct (struct inode * inode) bh = find_buffer(inode->i_dev, tmp, inode->i_sb->s_blocksize); if (bh) { - bh->b_count++; if (DATA_BUFFER_USED(bh)) { - brelse(bh); retry = 1; continue; } + bh->b_count++; } *p = 0; @@ -254,12 +253,11 @@ static int trunc_indirect (struct inode * inode, int offset, u32 * p, */ bh = find_buffer(inode->i_dev, tmp, inode->i_sb->s_blocksize); if (bh) { - bh->b_count++; if (DATA_BUFFER_USED(bh)) { - brelse(bh); retry = 1; continue; } + bh->b_count++; } *ind = 0; -- cgit v1.2.3