Commit 1097680d authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: fix endianness of getattr mask in ceph_d_revalidate

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: 200fd27c ("ceph: use lookup request to revalidate dentry")
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarSage Weil <sage@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 124f930b
...@@ -1230,7 +1230,8 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -1230,7 +1230,8 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
struct ceph_mds_client *mdsc = struct ceph_mds_client *mdsc =
ceph_sb_to_client(dir->i_sb)->mdsc; ceph_sb_to_client(dir->i_sb)->mdsc;
struct ceph_mds_request *req; struct ceph_mds_request *req;
int op, mask, err; int op, err;
u32 mask;
if (flags & LOOKUP_RCU) if (flags & LOOKUP_RCU)
return -ECHILD; return -ECHILD;
...@@ -1245,7 +1246,7 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -1245,7 +1246,7 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED;
if (ceph_security_xattr_wanted(dir)) if (ceph_security_xattr_wanted(dir))
mask |= CEPH_CAP_XATTR_SHARED; 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); err = ceph_mdsc_do_request(mdsc, NULL, req);
switch (err) { switch (err) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment