kernel_file_open(): get rid of inode argument

always equal to ->dentry->d_inode of the path argument these
days.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro af58dc1f 613aee94

+5 -7
+1 -2
fs/cachefiles/namei.c
··· 563 563 */ 564 564 path.mnt = cache->mnt; 565 565 path.dentry = dentry; 566 - file = kernel_file_open(&path, O_RDWR | O_LARGEFILE | O_DIRECT, 567 - d_backing_inode(dentry), cache->cache_cred); 566 + file = kernel_file_open(&path, O_RDWR | O_LARGEFILE | O_DIRECT, cache->cache_cred); 568 567 if (IS_ERR(file)) { 569 568 trace_cachefiles_vfs_error(object, d_backing_inode(dentry), 570 569 PTR_ERR(file),
+2 -3
fs/open.c
··· 1155 1155 * kernel_file_open - open a file for kernel internal use 1156 1156 * @path: path of the file to open 1157 1157 * @flags: open flags 1158 - * @inode: the inode 1159 1158 * @cred: credentials for open 1160 1159 * 1161 1160 * Open a file for use by in-kernel consumers. The file is not accounted ··· 1164 1165 * Return: Opened file on success, an error pointer on failure. 1165 1166 */ 1166 1167 struct file *kernel_file_open(const struct path *path, int flags, 1167 - struct inode *inode, const struct cred *cred) 1168 + const struct cred *cred) 1168 1169 { 1169 1170 struct file *f; 1170 1171 int error; ··· 1174 1175 return f; 1175 1176 1176 1177 f->f_path = *path; 1177 - error = do_dentry_open(f, inode, NULL); 1178 + error = do_dentry_open(f, d_inode(path->dentry), NULL); 1178 1179 if (error) { 1179 1180 fput(f); 1180 1181 f = ERR_PTR(error);
+1 -1
fs/overlayfs/util.c
··· 1376 1376 * If this inode was not yet opened, the verity info hasn't been 1377 1377 * loaded yet, so we need to do that here to force it into memory. 1378 1378 */ 1379 - filp = kernel_file_open(datapath, O_RDONLY, inode, current_cred()); 1379 + filp = kernel_file_open(datapath, O_RDONLY, current_cred()); 1380 1380 if (IS_ERR(filp)) 1381 1381 return PTR_ERR(filp); 1382 1382 fput(filp);
+1 -1
include/linux/fs.h
··· 1906 1906 umode_t mode, int open_flag, 1907 1907 const struct cred *cred); 1908 1908 struct file *kernel_file_open(const struct path *path, int flags, 1909 - struct inode *inode, const struct cred *cred); 1909 + const struct cred *cred); 1910 1910 1911 1911 int vfs_mkobj(struct dentry *, umode_t, 1912 1912 int (*f)(struct dentry *, umode_t, void *),