Skip to content

Commit

Permalink
cramfs: only unlock new inodes
Browse files Browse the repository at this point in the history
Commit 77b8a75 introduced a warning at fs/inode.c:692 unlock_new_inode(),
caused by unlock_new_inode() being called on existing inodes as well.

This patch changes setup_inode() to only call unlock_new_inode() for I_NEW
inodes.

Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
virtuoso authored and Al Viro committed Aug 18, 2010
1 parent f4ae2fa commit b845ff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cramfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
}
} else {
inode = iget_locked(sb, CRAMINO(cramfs_inode));
if (inode) {
if (inode && (inode->i_state & I_NEW)) {
setup_inode(inode, cramfs_inode);
unlock_new_inode(inode);
}
Expand Down

0 comments on commit b845ff8

Please sign in to comment.