From 0f69ba2b3fe6fe7ddd579215b5a57b03321510ba Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 21 Mar 2014 12:37:44 -0500 Subject: [PATCH] mount_image.c: Lookup inode instead of dentry when sufficient --- src/mount_image.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mount_image.c b/src/mount_image.c index cf5d4353..9dcfe9ee 100644 --- a/src/mount_image.c +++ b/src/mount_image.c @@ -2345,14 +2345,12 @@ wimfs_unlink(const char *path) static int wimfs_utimens(const char *path, const struct timespec tv[2]) { - struct wim_dentry *dentry; struct wim_inode *inode; WIMStruct *wim = wimfs_get_WIMStruct(); - dentry = get_dentry(wim, path, WIMLIB_CASE_SENSITIVE); - if (!dentry) + inode = wim_pathname_to_inode(wim, path); + if (!inode) return -errno; - inode = dentry->d_inode; if (tv[0].tv_nsec != UTIME_OMIT) { if (tv[0].tv_nsec == UTIME_NOW) @@ -2372,14 +2370,12 @@ wimfs_utimens(const char *path, const struct timespec tv[2]) static int wimfs_utime(const char *path, struct utimbuf *times) { - struct wim_dentry *dentry; struct wim_inode *inode; WIMStruct *wim = wimfs_get_WIMStruct(); - dentry = get_dentry(wim, path, WIMLIB_CASE_SENSITIVE); - if (!dentry) + inode = wim_pathname_to_inode(wim, path); + if (!inode) return -errno; - inode = dentry->d_inode; inode->i_last_write_time = unix_timestamp_to_wim(times->modtime); inode->i_last_access_time = unix_timestamp_to_wim(times->actime); -- 2.43.0