diff --git a/fs/inode.c b/fs/inode.c index 12c9e38529c9..aff2b5831168 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1675,12 +1675,9 @@ EXPORT_SYMBOL(generic_update_time); */ static int update_time(struct inode *inode, struct timespec64 *time, int flags) { - int (*update_time)(struct inode *, struct timespec64 *, int); - - update_time = inode->i_op->update_time ? inode->i_op->update_time : - generic_update_time; - - return update_time(inode, time, flags); + if (inode->i_op->update_time) + return inode->i_op->update_time(inode, time, flags); + return generic_update_time(inode, time, flags); } /**