Skip to contentSkip to conversation

cramfs: only unlock new inodes

PATCH Superseded Alexander Shishkin 1 participant 1 message Aug 17, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/cramfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/cramfs/inode.c +1 -1
index a53b130..1e7a330 100644
@@ -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);
 		}
Signature · 1 line
1.7.1