diff options
author | NeilBrown <neilb@suse.de> | 2006-06-26 00:27:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 09:58:38 -0700 |
commit | acc55e220166a5ad898e66ad6153fd62eaaac76d (patch) | |
tree | c342dcd3303f01d97c5fe7718af9daf22ec086d2 /drivers/md/bitmap.c | |
parent | 0cdd02cabd86b5d547f882005e23a93929f0ace9 (diff) | |
download | kernel_samsung_aries-acc55e220166a5ad898e66ad6153fd62eaaac76d.zip kernel_samsung_aries-acc55e220166a5ad898e66ad6153fd62eaaac76d.tar.gz kernel_samsung_aries-acc55e220166a5ad898e66ad6153fd62eaaac76d.tar.bz2 |
[PATCH] md/bitmap: tidy up i_writecount handling in md/bitmap
md/bitmap modifies i_writecount of a bitmap file to make sure that no-one else
writes to it. The reverting of the change is sometimes done twice, and there
is one error path where it is omitted.
This patch tidies that up.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index dfe5e127..e40d3e4 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -625,7 +625,6 @@ static void drain_write_queues(struct bitmap *bitmap) static void bitmap_file_put(struct bitmap *bitmap) { struct file *file; - struct inode *inode; unsigned long flags; spin_lock_irqsave(&bitmap->lock, flags); @@ -637,13 +636,8 @@ static void bitmap_file_put(struct bitmap *bitmap) bitmap_file_unmap(bitmap); - if (file) { - inode = file->f_mapping->host; - spin_lock(&inode->i_lock); - atomic_set(&inode->i_writecount, 1); /* allow writes again */ - spin_unlock(&inode->i_lock); + if (file) fput(file); - } } |