Re: [PATCH 1/3] shmem: fix double uncharge in __shmem_file_setup()

2014-06-25 Thread Hugh Dickins
On Wed, 25 Jun 2014, Konstantin Khlebnikov wrote: > 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 newly created inode. > This patch removes shmem_unacct_

[PATCH 1/3] shmem: fix double uncharge in __shmem_file_setup()

2014-06-24 Thread Konstantin Khlebnikov
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 newly created inode. This patch removes shmem_unacct_size() from error path if inode already here. Signed-off-b