Commit 2b450e92 authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

usb: convert to new timestamp accessors

Convert to using the new inode timestamp accessor functions.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-12-jlayton@kernel.orgSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 69f73ca3
......@@ -2642,21 +2642,24 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
snoop(&dev->dev, "%s: CONTROL\n", __func__);
ret = proc_control(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_BULK:
snoop(&dev->dev, "%s: BULK\n", __func__);
ret = proc_bulk(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_RESETEP:
snoop(&dev->dev, "%s: RESETEP\n", __func__);
ret = proc_resetep(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_RESET:
......@@ -2668,7 +2671,8 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__);
ret = proc_clearhalt(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_GETDRIVER:
......@@ -2695,7 +2699,8 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
snoop(&dev->dev, "%s: SUBMITURB\n", __func__);
ret = proc_submiturb(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
#ifdef CONFIG_COMPAT
......@@ -2703,14 +2708,16 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
snoop(&dev->dev, "%s: CONTROL32\n", __func__);
ret = proc_control_compat(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_BULK32:
snoop(&dev->dev, "%s: BULK32\n", __func__);
ret = proc_bulk_compat(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_DISCSIGNAL32:
......@@ -2722,7 +2729,8 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
snoop(&dev->dev, "%s: SUBMITURB32\n", __func__);
ret = proc_submiturb_compat(ps, p);
if (ret >= 0)
inode->i_mtime = inode_set_ctime_current(inode);
inode_set_mtime_to_ts(inode,
inode_set_ctime_current(inode));
break;
case USBDEVFS_IOCTL32:
......@@ -2804,7 +2812,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
done:
usb_unlock_device(dev);
if (ret >= 0)
inode->i_atime = current_time(inode);
inode_set_atime_to_ts(inode, current_time(inode));
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment