]> git.baikalelectronics.ru Git - kernel.git/commit
cachefiles: only pass inode to *mark_inode_inuse() helpers
authorMiklos Szeredi <mszeredi@redhat.com>
Sat, 24 Sep 2022 04:59:59 +0000 (06:59 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Sat, 24 Sep 2022 04:59:59 +0000 (06:59 +0200)
commit1328cbd3d6d270d4da4e983c7982bd5782df10b1
treece24bab7422c92bcf94d1a0c762deb4bc4bc2f1c
parenta770b3000e18793a253f75b2b257d44fa3e68d71
cachefiles: only pass inode to *mark_inode_inuse() helpers

The only reason to pass dentry was because of a pr_notice() text.  Move
that to the two callers where it makes sense and add a WARN_ON() to the
third.

file_inode(file) is never NULL on an opened file. Remove check in
cachefiles_unmark_inode_in_use().

Do not open code cachefiles_do_unmark_inode_in_use() in
cachefiles_put_directory().

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/cachefiles/namei.c