Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cd874237 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by David Woodhouse
Browse files

mtd: mtdchar: Do not corrupt backing device of device node inode



We cannot modify file->f_mapping->backing_dev_info, because it will corrupt
backing device of device node inode, since file->f_mapping is equal to
inode->i_mapping (see __dentry_open() in fs/open.c).

Let's introduce separate inode for MTD device with appropriate backing
device.

[dwmw2: Refactor to keep it all entirely within mtdchar.c; use iget_locked()]

Signed-off-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
Acked-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 11c93605
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment