aboutsummaryrefslogtreecommitdiff
path: root/fs/cramfs
diff options
context:
space:
mode:
authorAlexander Shishkin <virtuoso@slind.org>2010-08-17 17:08:35 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-18 01:01:33 -0400
commitb845ff8f3ea2988ad5041315e2d35298e85cbc2f (patch)
treeb2b4c7aaa45281ad8e0b1f39679ea7e2ff58da7e /fs/cramfs
parentf4ae2faa40199b97b12f508234640bc565d166f8 (diff)
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 <virtuoso@slind.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index a53b130b366..1e7a33028d3 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);
}