diff options
author | Jeff Layton <jlayton@redhat.com> | 2017-01-12 14:42:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-26 02:24:43 -0500 |
commit | 2e4f2131b66ffe64ef90d1e85223ef347e355b65 (patch) | |
tree | 33766364b2083ba8f81d08421e98c0715402664f /fs | |
parent | 8934e069674a09c4ce4a0858e1aee5474784df92 (diff) |
ceph: fix endianness of getattr mask in ceph_d_revalidate
commit 1097680d759918ce4a8705381c0ab2ed7bd60cf1 upstream.
sparse says:
fs/ceph/dir.c:1248:50: warning: incorrect type in assignment (different base types)
fs/ceph/dir.c:1248:50: expected restricted __le32 [usertype] mask
fs/ceph/dir.c:1248:50: got int [signed] [assigned] mask
Fixes: 200fd27c8fa2 ("ceph: use lookup request to revalidate dentry")
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index a594c7879cc2..1afa11191000 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -1255,7 +1255,8 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) | |||
1255 | struct ceph_mds_client *mdsc = | 1255 | struct ceph_mds_client *mdsc = |
1256 | ceph_sb_to_client(dir->i_sb)->mdsc; | 1256 | ceph_sb_to_client(dir->i_sb)->mdsc; |
1257 | struct ceph_mds_request *req; | 1257 | struct ceph_mds_request *req; |
1258 | int op, mask, err; | 1258 | int op, err; |
1259 | u32 mask; | ||
1259 | 1260 | ||
1260 | if (flags & LOOKUP_RCU) | 1261 | if (flags & LOOKUP_RCU) |
1261 | return -ECHILD; | 1262 | return -ECHILD; |
@@ -1270,7 +1271,7 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) | |||
1270 | mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; | 1271 | mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; |
1271 | if (ceph_security_xattr_wanted(dir)) | 1272 | if (ceph_security_xattr_wanted(dir)) |
1272 | mask |= CEPH_CAP_XATTR_SHARED; | 1273 | mask |= CEPH_CAP_XATTR_SHARED; |
1273 | req->r_args.getattr.mask = mask; | 1274 | req->r_args.getattr.mask = cpu_to_le32(mask); |
1274 | 1275 | ||
1275 | err = ceph_mdsc_do_request(mdsc, NULL, req); | 1276 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
1276 | switch (err) { | 1277 | switch (err) { |