mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
ceph: fix "ceph.dir.rctime" vxattr value
The vxattr value incorrectly places a "09" prefix to the nanoseconds
field, instead of providing it as a zero-pad width specifier after '%'.
Fixes: 3489b42a72
("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>
This commit is contained in:
parent
d0f191d20c
commit
718807289d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user