diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2019-12-02 21:19:45 -0800 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-12-08 19:10:56 -0500 |
commit | 23b424d9c36e6205d38130f9d96fa755e51e8817 (patch) | |
tree | 350c1ff01dddd3c3e7155e1c9720edd70e7a606d /fs/inode.c | |
parent | ba70609d5ec664a8f36ba1c857fcd97a478adf79 (diff) | |
download | linux-rpi-23b424d9c36e6205d38130f9d96fa755e51e8817.tar.gz linux-rpi-23b424d9c36e6205d38130f9d96fa755e51e8817.tar.bz2 linux-rpi-23b424d9c36e6205d38130f9d96fa755e51e8817.zip |
fs: Do not overload update_time
update_time() also has an internal function pointer
update_time. Even though this works correctly, it is
confusing to the readers.
Just use a regular if statement to call the generic
function or the function pointer.
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); } /** |