Skip to content

Commit b845ff8

Browse files
virtuosoAl Viro
authored andcommitted
cramfs: only unlock new inodes
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 <virtuoso@slind.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent f4ae2fa commit b845ff8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/cramfs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
8080
}
8181
} else {
8282
inode = iget_locked(sb, CRAMINO(cramfs_inode));
83-
if (inode) {
83+
if (inode && (inode->i_state & I_NEW)) {
8484
setup_inode(inode, cramfs_inode);
8585
unlock_new_inode(inode);
8686
}

0 commit comments

Comments
 (0)