summaryrefslogtreecommitdiffstats
path: root/fs/minix/bitmap.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-04 22:27:38 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:53 -0400
commit5ccb4a78d8c0e27985afec32cc4894d48e7b876e (patch)
tree9f02b4f89011b45a21768f9b52c9822ce7cc7497 /fs/minix/bitmap.c
parent01cd9fef6eb3caae06415861de5b53224b722549 (diff)
downloadop-kernel-dev-5ccb4a78d8c0e27985afec32cc4894d48e7b876e.zip
op-kernel-dev-5ccb4a78d8c0e27985afec32cc4894d48e7b876e.tar.gz
switch minix to ->evict_inode(), fix write_inode/delete_inode race
We need to wait for completion of possible writeback in progress before we clear on-disk inode during deletion. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/minix/bitmap.c')
-rw-r--r--fs/minix/bitmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c
index 482779f..3f32bcb 100644
--- a/fs/minix/bitmap.c
+++ b/fs/minix/bitmap.c
@@ -200,13 +200,13 @@ void minix_free_inode(struct inode * inode)
ino = inode->i_ino;
if (ino < 1 || ino > sbi->s_ninodes) {
printk("minix_free_inode: inode 0 or nonexistent inode\n");
- goto out;
+ return;
}
bit = ino & ((1<<k) - 1);
ino >>= k;
if (ino >= sbi->s_imap_blocks) {
printk("minix_free_inode: nonexistent imap in superblock\n");
- goto out;
+ return;
}
minix_clear_inode(inode); /* clear on-disk copy */
@@ -217,8 +217,6 @@ void minix_free_inode(struct inode * inode)
printk("minix_free_inode: bit %lu already cleared\n", bit);
spin_unlock(&bitmap_lock);
mark_buffer_dirty(bh);
- out:
- clear_inode(inode); /* clear in-memory copy */
}
struct inode *minix_new_inode(const struct inode *dir, int mode, int *error)
OpenPOWER on IntegriCloud