]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
pstore: drop file opened reference count
authorGeliang Tang <geliangtang@163.com>
Sat, 7 Nov 2015 04:43:49 +0000 (12:43 +0800)
committerIshan Mittal <imittal@nvidia.com>
Fri, 6 Jan 2017 10:14:21 +0000 (15:44 +0530)
commit4ba1ef34966d725426a3fee2ffd639918bc8c94f
treeaecbbaccab65f4ca00043736c288e13579274bb3
parenta5f48a5780679055c8dcdae2988ab6c2d505ca43
pstore: drop file opened reference count

commit 52d210d961a62a9662e27f14d6505d6741b2fb02 upstream.

In ee1d267423a1 ("pstore: add pstore unregister") I added:
.owner = THIS_MODULE,
in both pstore_fs_type and pstore_file_operations to increase a reference
count when pstore filesystem is mounted and pstore file is opened.

But, it's repetitive. There is no need to increase the opened reference
count. We only need to increase the mounted reference count. When a file
is opened, the filesystem can't be unmounted. Hence the pstore module
can't be unloaded either.

So I drop the opened reference count in this patch.

Fixes: ee1d267423a1 ("pstore: add pstore unregister")
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/pstore/inode.c