Skip to content

Commit

Permalink
ceph: fix "ceph.dir.rctime" vxattr value
Browse files Browse the repository at this point in the history
The vxattr value incorrectly places a "09" prefix to the nanoseconds
field, instead of providing it as a zero-pad width specifier after '%'.

Fixes: 3489b42 ("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>
  • Loading branch information
David Disseldorp authored and Ilya Dryomov committed Jul 8, 2019
1 parent d0f191d commit 7188072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,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);
}

Expand Down

0 comments on commit 7188072

Please sign in to comment.