diff options
author | Jeff Layton <jlayton@redhat.com> | 2017-01-12 14:42:38 -0500 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-11-20 18:05:58 +0000 |
commit | 4552db4687e93d379f7be755591d4aa730b5de46 (patch) | |
tree | 1b106953896249b29ed322351047745fe9534dd9 | |
parent | b72d88983415d962b86071ac0ea9695e7c2df8e3 (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>
Cc: Bryan Henderson <bryanh@giraffe-data.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 e8842edb08ab..5e2005030f54 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1068,7 +1068,8 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) struct ceph_mds_client *mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; struct ceph_mds_request *req; - int op, mask, err; + int op, err; + u32 mask; op = ceph_snap(dir) == CEPH_SNAPDIR ? CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_GETATTR; @@ -1080,7 +1081,7 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; if (ceph_security_xattr_wanted(dir)) mask |= CEPH_CAP_XATTR_SHARED; - req->r_args.getattr.mask = mask; + req->r_args.getattr.mask = cpu_to_le32(mask); err = ceph_mdsc_do_request(mdsc, NULL, req); switch (err) { |