]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.7.7/pstore-drop-file-opened-reference-count.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.7.7 / pstore-drop-file-opened-reference-count.patch
CommitLineData
8d8bb877
GKH
1From 52d210d961a62a9662e27f14d6505d6741b2fb02 Mon Sep 17 00:00:00 2001
2From: Geliang Tang <geliangtang@163.com>
3Date: Sat, 7 Nov 2015 12:43:49 +0800
4Subject: pstore: drop file opened reference count
5
6From: Geliang Tang <geliangtang@163.com>
7
8commit 52d210d961a62a9662e27f14d6505d6741b2fb02 upstream.
9
10In ee1d267423a1 ("pstore: add pstore unregister") I added:
11 .owner = THIS_MODULE,
12in both pstore_fs_type and pstore_file_operations to increase a reference
13count when pstore filesystem is mounted and pstore file is opened.
14
15But, it's repetitive. There is no need to increase the opened reference
16count. We only need to increase the mounted reference count. When a file
17is opened, the filesystem can't be unmounted. Hence the pstore module
18can't be unloaded either.
19
20So I drop the opened reference count in this patch.
21
22Fixes: ee1d267423a1 ("pstore: add pstore unregister")
23Signed-off-by: Geliang Tang <geliangtang@163.com>
24Signed-off-by: Kees Cook <keescook@chromium.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27---
28 fs/pstore/inode.c | 1 -
29 1 file changed, 1 deletion(-)
30
31--- a/fs/pstore/inode.c
32+++ b/fs/pstore/inode.c
33@@ -178,7 +178,6 @@ static loff_t pstore_file_llseek(struct
34 }
35
36 static const struct file_operations pstore_file_operations = {
37- .owner = THIS_MODULE,
38 .open = pstore_file_open,
39 .read = pstore_file_read,
40 .llseek = pstore_file_llseek,