summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-11-07 12:43:49 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-07 15:21:22 +0200
commit4d66d6d28d6d7db5c88f60f7acb6cd9a33238577 (patch)
treeef72a54aba3b8b7ff113c89897935107775f548e
parentefa079a92395c01d927bc5221c90dff2ec5003e9 (diff)
downloadlinux-stable-4d66d6d28d6d7db5c88f60f7acb6cd9a33238577.tar.gz
linux-stable-4d66d6d28d6d7db5c88f60f7acb6cd9a33238577.tar.bz2
linux-stable-4d66d6d28d6d7db5c88f60f7acb6cd9a33238577.zip
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>
-rw-r--r--fs/pstore/inode.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 45d6110744cb..ec9ddef5ae75 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -178,7 +178,6 @@ static loff_t pstore_file_llseek(struct file *file, loff_t off, int whence)
}
static const struct file_operations pstore_file_operations = {
- .owner = THIS_MODULE,
.open = pstore_file_open,
.read = pstore_file_read,
.llseek = pstore_file_llseek,