Skip to content

Commit

Permalink
pstore: drop file opened reference count
Browse files Browse the repository at this point in the history
In ee1d267 ("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: ee1d267 ("pstore: add pstore unregister")
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
  • Loading branch information
geliangtang authored and kees committed Jun 2, 2016
1 parent 8cfc8dd commit 52d210d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/pstore/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 52d210d

Please sign in to comment.