Commit 65b95b9c authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] tmpfs free_inodes leak

When new_inode failed, shmem_get_inode forgot to restore free_inodes.
Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0b722f75
...@@ -1314,6 +1314,10 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev) ...@@ -1314,6 +1314,10 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev)
case S_IFLNK: case S_IFLNK:
break; break;
} }
} else if (sbinfo) {
spin_lock(&sbinfo->stat_lock);
sbinfo->free_inodes++;
spin_unlock(&sbinfo->stat_lock);
} }
return inode; return inode;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment