summaryrefslogtreecommitdiffstats
path: root/fs/utimes.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-15 08:19:55 +0200
committerChristoph Hellwig <hch@lst.de>2020-07-31 08:16:01 +0200
commitfd5ad30c782351ab4d4a15941fc61e743a1bd66c (patch)
tree94e703988a84b6c28059aec258e98f014dc7688f /fs/utimes.c
parentfs: move timespec validation into utimes_common (diff)
downloadlinux-fd5ad30c782351ab4d4a15941fc61e743a1bd66c.tar.xz
linux-fd5ad30c782351ab4d4a15941fc61e743a1bd66c.zip
fs: expose utimes_common
Rename utimes_common to vfs_utimes and make it available outside of utimes.c. This will be used by the initramfs unpacking code. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/utimes.c')
-rw-r--r--fs/utimes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/utimes.c b/fs/utimes.c
index bfd86e81c590..fd3cc4226224 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -16,7 +16,7 @@ static bool nsec_valid(long nsec)
return nsec >= 0 && nsec <= 999999999;
}
-static int utimes_common(const struct path *path, struct timespec64 *times)
+int vfs_utimes(const struct path *path, struct timespec64 *times)
{
int error;
struct iattr newattrs;
@@ -94,7 +94,7 @@ retry:
if (error)
return error;
- error = utimes_common(&path, times);
+ error = vfs_utimes(&path, times);
path_put(&path);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
@@ -115,7 +115,7 @@ static int do_utimes_fd(int fd, struct timespec64 *times, int flags)
f = fdget(fd);
if (!f.file)
return -EBADF;
- error = utimes_common(&f.file->f_path, times);
+ error = vfs_utimes(&f.file->f_path, times);
fdput(f);
return error;
}