CEPH filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: "Yan, Zheng" <zyan@redhat.com>
Cc: Sage Weil <sage@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel@vger.kernel.org
Subject: [PATCH 1/4] ceph: fix endianness of getattr mask in ceph_d_revalidate
Date: Thu, 12 Jan 2017 11:12:42 -0500	[thread overview]
Message-ID: <1484237565-27423-2-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <1484237565-27423-1-git-send-email-jlayton@redhat.com>

    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

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/ceph/dir.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index cd99b26de4da..d4385563b70a 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1230,7 +1230,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;
 
 		if (flags & LOOKUP_RCU)
 			return -ECHILD;
@@ -1245,7 +1246,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) {
-- 
2.7.4


  reply	other threads:[~2017-01-12 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 16:12 [PATCH 0/4] ceph: endianness fixes and sparse warning fixes Jeff Layton
2017-01-12 16:12 ` Jeff Layton [this message]
2017-01-12 16:43   ` [PATCH 1/4] ceph: fix endianness of getattr mask in ceph_d_revalidate Ilya Dryomov
2017-01-12 17:16     ` Jeff Layton
2017-01-12 16:12 ` [PATCH 2/4] ceph: fix endianness bug in frag_tree_split_cmp Jeff Layton
2017-01-12 16:12 ` [PATCH 3/4] ceph: fix bogus endianness change in ceph_ioctl_set_layout Jeff Layton
2017-01-12 16:12 ` [PATCH 4/4] ceph: fix bad endianness handling in parse_reply_info_extra Jeff Layton
2017-01-12 16:23 ` [PATCH 0/4] ceph: endianness fixes and sparse warning fixes Sage Weil
2017-01-13 12:36   ` Jeff Layton
2017-01-17 18:26     ` David Disseldorp
2017-01-17 18:28       ` Ilya Dryomov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484237565-27423-2-git-send-email-jlayton@redhat.com \
    --to=jlayton@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=sage@redhat.com \
    --cc=zyan@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox