summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-26 11:05:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-26 11:05:42 -0700
commit9e54ef9da519d9febfa61fa9392276fbfa6ce79c (patch)
tree6f3f4f227b039c18394a6ce053e9e99252afbdb3 /fs
parentf1638fc65ee23875cf4021e342e8a564debe33e4 (diff)
parent966fa72a716ceafc69de901a31f7cc1f52b35f81 (diff)
Merge tag 'driver-core-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fix from Greg KH: "Here is a single kernfs fix for 4.11-rc4 that resolves a reported issue. It has been in linux-next with no reported issues" * tag 'driver-core-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kernfs: Check KERNFS_HAS_RELEASE before calling kernfs_release_file()
Diffstat (limited to 'fs')
-rw-r--r--fs/kernfs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 8e4dc7ab584c..ac2dfe0c5a9c 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -809,7 +809,8 @@ void kernfs_drain_open_files(struct kernfs_node *kn)
if (kn->flags & KERNFS_HAS_MMAP)
unmap_mapping_range(inode->i_mapping, 0, 0, 1);
- kernfs_release_file(kn, of);
+ if (kn->flags & KERNFS_HAS_RELEASE)
+ kernfs_release_file(kn, of);
}
mutex_unlock(&kernfs_open_file_mutex);