diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-06 17:22:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-06 17:22:11 -0700 |
commit | ab296221579715fb8f36a27c374ebabe5bfb7e9e (patch) | |
tree | 0a29573f8bf21ce31f56ad45a606c8c9fd6c3dd4 /drivers | |
parent | 7a3353c5c441175582cf0d17f855b2ffd83fb9db (diff) | |
parent | 4094d98e3375833737b467998219338ffd46a68b (diff) |
Merge tag 'pull-file_inode' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull file_inode() updates from Al Vrio:
"whack-a-mole: cropped up open-coded file_inode() uses..."
* tag 'pull-file_inode' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
orangefs: use ->f_mapping
_nfs42_proc_copy(): use ->f_mapping instead of file_inode()->i_mapping
dma_buf: no need to bother with file_inode()->i_mapping
nfs_finish_open(): don't open-code file_inode()
bprm_fill_uid(): don't open-code file_inode()
sgx: use ->f_mapping...
exfat_iterate(): don't open-code file_inode(file)
ibmvmc: don't open-code file_inode()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma-buf/udmabuf.c | 2 | ||||
-rw-r--r-- | drivers/misc/ibmvmc.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index bf11d32205f3..2bcdb935a3ac 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -213,7 +213,7 @@ static long udmabuf_create(struct miscdevice *device, memfd = fget(list[i].memfd); if (!memfd) goto err; - mapping = file_inode(memfd)->i_mapping; + mapping = memfd->f_mapping; if (!shmem_mapping(mapping) && !is_file_hugepages(memfd)) goto err; seals = memfd_fcntl(memfd, F_GET_SEALS, 0); diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c index c0fe3295c330..cbaf6d35e854 100644 --- a/drivers/misc/ibmvmc.c +++ b/drivers/misc/ibmvmc.c @@ -1039,6 +1039,7 @@ static unsigned int ibmvmc_poll(struct file *file, poll_table *wait) static ssize_t ibmvmc_write(struct file *file, const char *buffer, size_t count, loff_t *ppos) { + struct inode *inode; struct ibmvmc_buffer *vmc_buffer; struct ibmvmc_file_session *session; struct crq_server_adapter *adapter; @@ -1122,8 +1123,9 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer, if (p == buffer) goto out; - file->f_path.dentry->d_inode->i_mtime = current_time(file_inode(file)); - mark_inode_dirty(file->f_path.dentry->d_inode); + inode = file_inode(file); + inode->i_mtime = current_time(inode); + mark_inode_dirty(inode); dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n", (unsigned long)file, (unsigned long)count); |