summaryrefslogtreecommitdiff
path: root/fs/sysv
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-04-29 23:53:51 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-04-29 23:53:51 -0700
commit39e8cdf731118a140eca48e69cc31ff53abe2d64 (patch)
tree7e5a91f4d8c205f63fb7f0cba6edbc87ab3fefe1 /fs/sysv
parent411973b4db28fa3b2a97f44aa4897efe173a0b06 (diff)
[PATCH] cleanup of bh->flags
Moves all buffer_head-related stuff out of linux/fs.h and into linux/buffer_head.h. buffer_head.h is currently included at the very end of fs.h. So it is possible to include buffer_head directly from all .c files and remove this nested include. Also rationalises all the set_buffer_foo() and mark_buffer_bar() functions. We have: set_buffer_foo(bh) clear_buffer_foo(bh) buffer_foo(bh) and, in some cases, where needed: test_set_buffer_foo(bh) test_clear_buffer_foo(bh) And that's it. BUFFER_FNS() and TAS_BUFFER_FNS() macros generate all the above real inline functions. Normally not a big fan of cpp abuse, but in this case it fits. These function-generating macros are available to filesystems to expand their own b_state functions. JBD uses this in one case.
Diffstat (limited to 'fs/sysv')
-rw-r--r--fs/sysv/balloc.c2
-rw-r--r--fs/sysv/itree.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysv/balloc.c b/fs/sysv/balloc.c
index 2f3df11dd207..1f74c76c1f17 100644
--- a/fs/sysv/balloc.c
+++ b/fs/sysv/balloc.c
@@ -83,7 +83,7 @@ void sysv_free_block(struct super_block * sb, u32 nr)
*(u16*)bh->b_data = cpu_to_fs16(sb, count);
memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t));
mark_buffer_dirty(bh);
- mark_buffer_uptodate(bh, 1);
+ set_buffer_uptodate(bh);
brelse(bh);
count = 0;
}
diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c
index 74476c196b0f..7ab117a11e58 100644
--- a/fs/sysv/itree.c
+++ b/fs/sysv/itree.c
@@ -145,7 +145,7 @@ static int alloc_branch(struct inode *inode,
branch[n].bh = bh;
branch[n].p = (u32*) bh->b_data + offsets[n];
*branch[n].p = branch[n].key;
- mark_buffer_uptodate(bh, 1);
+ set_buffer_uptodate(bh);
unlock_buffer(bh);
dirty_indirect(bh, inode);
}
@@ -246,7 +246,7 @@ out:
if (splice_branch(inode, chain, partial, left) < 0)
goto changed;
- bh_result->b_state |= (1UL << BH_New);
+ set_buffer_new(bh_result);
goto got_it;
changed: