Commit 12129e6c authored by Vladimir Saveliev's avatar Vladimir Saveliev Committed by Linus Torvalds

[PATCH] reiserfs bug fix: add missing pair of lock_kernel()/unlock_kernel()

This patch adds missing lock_kernel()/unlock_kernel() pair in
reiserfs_get_dentry
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 87470444
...@@ -1449,12 +1449,14 @@ struct dentry *reiserfs_get_dentry(struct super_block *sb, void *vobjp) ...@@ -1449,12 +1449,14 @@ struct dentry *reiserfs_get_dentry(struct super_block *sb, void *vobjp)
key.on_disk_key.k_objectid = data[0] ; key.on_disk_key.k_objectid = data[0] ;
key.on_disk_key.k_dir_id = data[1] ; key.on_disk_key.k_dir_id = data[1] ;
reiserfs_write_lock(sb);
inode = reiserfs_iget(sb, &key) ; inode = reiserfs_iget(sb, &key) ;
if (inode && !IS_ERR(inode) && data[2] != 0 && if (inode && !IS_ERR(inode) && data[2] != 0 &&
data[2] != inode->i_generation) { data[2] != inode->i_generation) {
iput(inode) ; iput(inode) ;
inode = NULL ; inode = NULL ;
} }
reiserfs_write_unlock(sb);
if (!inode) if (!inode)
inode = ERR_PTR(-ESTALE); inode = ERR_PTR(-ESTALE);
if (IS_ERR(inode)) if (IS_ERR(inode))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment