From 66ee4b8887ec5ce04bae3e840d206db7b7ad34d1 Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Wed, 6 Aug 2014 16:06:32 -0700 Subject: [PATCH] shmem: fix double uncharge in __shmem_file_setup() If __shmem_file_setup() fails on struct file allocation it uncharges memory commitment twice: first by shmem_unacct_size() and second time implicitly in shmem_evict_inode() when it kills the newly created inode. This patch removes shmem_unacct_size() from error path if the inode was already there. Signed-off-by: Konstantin Khlebnikov Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed