diff options
Diffstat (limited to 'fs/kernfs/file.c')
-rw-r--r-- | fs/kernfs/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index 404ffd2f27bc..231a171f48b6 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -700,11 +700,14 @@ static int kernfs_fop_release(struct inode *inode, struct file *filp) return 0; } -void kernfs_unmap_file(struct kernfs_node *kn) +void kernfs_unmap_bin_file(struct kernfs_node *kn) { struct kernfs_open_node *on; struct kernfs_open_file *of; + if (!(kn->flags & KERNFS_HAS_MMAP)) + return; + spin_lock_irq(&kernfs_open_node_lock); on = kn->attr.open; if (on) |