On Fri, May 20, 2022 at 11:36:39AM -0700, Stefan Roesch wrote: > +static int file_needs_update_time(struct inode *inode, struct file *file, > + struct timespec64 *now) > { > int sync_it = 0; No need to pass both and inode and a file as the former can be trivially derived from the latter. But if I'm not misreading the patch, file is entirely unused here anyway, so can't we just drop it and rename the function to inode_needs_update_time? > +static int __file_update_time(struct inode *inode, struct file *file, > + struct timespec64 *now, int sync_mode) > +{ > + int ret = 0; > > + /* try to update time settings */ > + if (!__mnt_want_write_file(file)) { > + ret = inode_update_time(inode, now, sync_mode); > + __mnt_drop_write_file(file); > + } I'd be tempted to just open code this in the two callers, but either way works for me. If we keep the function please don't pass the inode separately.