]>
Commit | Line | Data |
---|---|---|
8d8bb877 GKH |
1 | From 52d210d961a62a9662e27f14d6505d6741b2fb02 Mon Sep 17 00:00:00 2001 |
2 | From: Geliang Tang <geliangtang@163.com> | |
3 | Date: Sat, 7 Nov 2015 12:43:49 +0800 | |
4 | Subject: pstore: drop file opened reference count | |
5 | ||
6 | From: Geliang Tang <geliangtang@163.com> | |
7 | ||
8 | commit 52d210d961a62a9662e27f14d6505d6741b2fb02 upstream. | |
9 | ||
10 | In ee1d267423a1 ("pstore: add pstore unregister") I added: | |
11 | .owner = THIS_MODULE, | |
12 | in both pstore_fs_type and pstore_file_operations to increase a reference | |
13 | count when pstore filesystem is mounted and pstore file is opened. | |
14 | ||
15 | But, it's repetitive. There is no need to increase the opened reference | |
16 | count. We only need to increase the mounted reference count. When a file | |
17 | is opened, the filesystem can't be unmounted. Hence the pstore module | |
18 | can't be unloaded either. | |
19 | ||
20 | So I drop the opened reference count in this patch. | |
21 | ||
22 | Fixes: ee1d267423a1 ("pstore: add pstore unregister") | |
23 | Signed-off-by: Geliang Tang <geliangtang@163.com> | |
24 | Signed-off-by: Kees Cook <keescook@chromium.org> | |
25 | Signed-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, |