diff options
| author | Jeff Layton <jlayton@redhat.com> | 2017-10-31 15:51:14 -0400 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2017-11-13 06:11:58 -0500 |
| commit | ec1dff25b0a012711e10290039fbc8e1c5dd69fb (patch) | |
| tree | abca7c73855fab6da300941d334dee88c2be5667 | |
| parent | 81302565178cfa2d419f5e9743add02997c6b2dc (diff) | |
ceph: silence sparse endianness warning in encode_caps_cb
sparse warns:
fs/ceph/mds_client.c:2887:34: warning: incorrect type in assignment (different base types)
fs/ceph/mds_client.c:2887:34: expected restricted __le32 [assigned] [usertype] flock_len
fs/ceph/mds_client.c:2887:34: got int
At this point, it's just being used as a flag. It gets
overwritten later if the rest of the encoding succeeds.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
| -rw-r--r-- | fs/ceph/mds_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 53cde84e698a..ab69dcb70e8a 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
| @@ -2885,8 +2885,8 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, | |||
| 2885 | rec.v2.issued = cpu_to_le32(cap->issued); | 2885 | rec.v2.issued = cpu_to_le32(cap->issued); |
| 2886 | rec.v2.snaprealm = cpu_to_le64(ci->i_snap_realm->ino); | 2886 | rec.v2.snaprealm = cpu_to_le64(ci->i_snap_realm->ino); |
| 2887 | rec.v2.pathbase = cpu_to_le64(pathbase); | 2887 | rec.v2.pathbase = cpu_to_le64(pathbase); |
| 2888 | rec.v2.flock_len = | 2888 | rec.v2.flock_len = (__force __le32) |
| 2889 | (ci->i_ceph_flags & CEPH_I_ERROR_FILELOCK) ? 0 : 1; | 2889 | ((ci->i_ceph_flags & CEPH_I_ERROR_FILELOCK) ? 0 : 1); |
| 2890 | } else { | 2890 | } else { |
| 2891 | rec.v1.cap_id = cpu_to_le64(cap->cap_id); | 2891 | rec.v1.cap_id = cpu_to_le64(cap->cap_id); |
| 2892 | rec.v1.wanted = cpu_to_le32(__ceph_caps_wanted(ci)); | 2892 | rec.v1.wanted = cpu_to_le32(__ceph_caps_wanted(ci)); |
