Skip to content

Commit

Permalink
ceph: filter out used flags when printing unused open flags
Browse files Browse the repository at this point in the history
Filter out used access mode flags when printing unused open flags.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Chengguang Xu authored and Ilya Dryomov committed Apr 2, 2018
1 parent 1582af2 commit 51b10f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ static __le32 ceph_flags_sys2wire(u32 flags)
break;
}

flags &= ~O_ACCMODE;

#define ceph_sys2wire(a) if (flags & a) { wire_flags |= CEPH_##a; flags &= ~a; }

ceph_sys2wire(O_CREAT);
Expand Down

0 comments on commit 51b10f3

Please sign in to comment.