summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2019-05-15 16:56:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-27 14:51:00 +0100
commitf053b46728cc3354a1c83ed4989b39efa53c5a7d (patch)
tree8b35353965f52df8bde77b05a6c2b79b55b045ca /fs/ceph
parentcdf4c2162548e6e0356c6a81e49f6e831eb4007e (diff)
ceph: fix "ceph.dir.rctime" vxattr value
[ Upstream commit 718807289d4130be1fe13f24f018733116958070 ] The vxattr value incorrectly places a "09" prefix to the nanoseconds field, instead of providing it as a zero-pad width specifier after '%'. Fixes: 3489b42a72a4 ("ceph: fix three bugs, two in ceph_vxattrcb_file_layout()") Link: https://tracker.ceph.com/issues/39943 Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 5e4f3f833e85..a09ce27ab220 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -221,7 +221,7 @@ static size_t ceph_vxattrcb_dir_rbytes(struct ceph_inode_info *ci, char *val,
static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val,
size_t size)
{
- return snprintf(val, size, "%lld.09%ld", ci->i_rctime.tv_sec,
+ return snprintf(val, size, "%lld.%09ld", ci->i_rctime.tv_sec,
ci->i_rctime.tv_nsec);
}