From: Alexander Shishkin Date: Tue, 17 Aug 2010 14:08:35 +0000 (+0300) Subject: cramfs: only unlock new inodes X-Git-Tag: v5.15~28200^2~16 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b845ff8f3ea2988ad5041315e2d35298e85cbc2f;p=mirror_ubuntu-kernels.git cramfs: only unlock new inodes Commit 77b8a75f5bb 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 Signed-off-by: Al Viro --- diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index a53b130b366c..1e7a33028d33 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -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); }