diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 25b303276b82..6d5a1f8f72ab 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -99,6 +99,9 @@ static int jfs_create(struct mnt_idmap *idmap, struct inode *dip, tid = txBegin(dip->i_sb, 0); if (tid == 0) { jfs_err("jfs_create: unable to create tblk due to read only filesystem"); + free_ea_wmap(ip); + clear_nlink(ip); + discard_new_inode(ip); return -EROFS; }