diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-14 17:34:31 -0400 |
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-14 17:34:31 -0400 |
| commit | 27b3a5c51b50a234fb4a21146841e6723b5934ce (patch) | |
| tree | 41b1df81b0b40b0115c77f835b3791db7c13c1f5 | |
| parent | 205cb37b89ab37db553907e5ac17962eec561804 (diff) | |
kill-the-bkl/reiserfs: drop the fs race watchdog from _get_block_create_0()
We had a watchdog in _get_block_create_0() that jumped to a fixup retry
path in case the bkl got relaxed while calling kmap().
This is not necessary anymore since we now have a reiserfs lock that is
not implicitly relaxed while sleeping.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Laurent Riffard <laurent.riffard@free.fr>
Cc: Thomas Gleixner <tglx@linutronix.de>
| -rw-r--r-- | fs/reiserfs/inode.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 965c8eaadb1e..0d493a3bb749 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
| @@ -251,7 +251,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block, | |||
| 251 | struct cpu_key key; | 251 | struct cpu_key key; |
| 252 | struct buffer_head *bh; | 252 | struct buffer_head *bh; |
| 253 | struct item_head *ih, tmp_ih; | 253 | struct item_head *ih, tmp_ih; |
| 254 | int fs_gen; | ||
| 255 | b_blocknr_t blocknr; | 254 | b_blocknr_t blocknr; |
| 256 | char *p = NULL; | 255 | char *p = NULL; |
| 257 | int chars; | 256 | int chars; |
| @@ -265,7 +264,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block, | |||
| 265 | (loff_t) block * inode->i_sb->s_blocksize + 1, TYPE_ANY, | 264 | (loff_t) block * inode->i_sb->s_blocksize + 1, TYPE_ANY, |
| 266 | 3); | 265 | 3); |
| 267 | 266 | ||
| 268 | research: | ||
| 269 | result = search_for_position_by_key(inode->i_sb, &key, &path); | 267 | result = search_for_position_by_key(inode->i_sb, &key, &path); |
| 270 | if (result != POSITION_FOUND) { | 268 | if (result != POSITION_FOUND) { |
| 271 | pathrelse(&path); | 269 | pathrelse(&path); |
| @@ -340,7 +338,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block, | |||
| 340 | } | 338 | } |
| 341 | // read file tail into part of page | 339 | // read file tail into part of page |
| 342 | offset = (cpu_key_k_offset(&key) - 1) & (PAGE_CACHE_SIZE - 1); | 340 | offset = (cpu_key_k_offset(&key) - 1) & (PAGE_CACHE_SIZE - 1); |
| 343 | fs_gen = get_generation(inode->i_sb); | ||
| 344 | copy_item_head(&tmp_ih, ih); | 341 | copy_item_head(&tmp_ih, ih); |
| 345 | 342 | ||
| 346 | /* we only want to kmap if we are reading the tail into the page. | 343 | /* we only want to kmap if we are reading the tail into the page. |
| @@ -348,13 +345,9 @@ static int _get_block_create_0(struct inode *inode, sector_t block, | |||
| 348 | ** sure we need to. But, this means the item might move if | 345 | ** sure we need to. But, this means the item might move if |
| 349 | ** kmap schedules | 346 | ** kmap schedules |
| 350 | */ | 347 | */ |
| 351 | if (!p) { | 348 | if (!p) |
| 352 | p = (char *)kmap(bh_result->b_page); | 349 | p = (char *)kmap(bh_result->b_page); |
| 353 | if (fs_changed(fs_gen, inode->i_sb) | 350 | |
| 354 | && item_moved(&tmp_ih, &path)) { | ||
| 355 | goto research; | ||
| 356 | } | ||
| 357 | } | ||
| 358 | p += offset; | 351 | p += offset; |
| 359 | memset(p, 0, inode->i_sb->s_blocksize); | 352 | memset(p, 0, inode->i_sb->s_blocksize); |
| 360 | do { | 353 | do { |
