Re: [PATCH] btrfs: update device path inode time instead of bd_inode

Christoph Hellwig
2021-10-14T15:53:46Z

On Thu, Oct 14, 2021 at 11:50:07AM -0400, Josef Bacik wrote:
> On Thu, Oct 14, 2021 at 05:33:47PM +0200, Christoph Hellwig wrote:
> > On Thu, Oct 14, 2021 at 11:17:08AM -0400, Josef Bacik wrote:
> > > + now = current_time(d_inode(path.dentry));
> > > + generic_update_time(d_inode(path.dentry), &now, S_MTIME | S_CTIME);
> >
> > This is still broken as it won't call into ->update_time.
> > generic_update_time is a helper/default for ->update_time, not something
> > for an external caller.
>
> Then we probably need to fix all the people currently calling it.

All other callers are from update_time / ->update_time.

> In the
> meantime I'll add a helper to use the thing that calls ->update_time instead.
> Thanks,

Looking at this a bit more I think the right fix is to simply revert the
offending commit. The lockdep complains was due to changes issues in the
loop driver and has been fixed in the loop driver in the meantime.