diff options
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 879911c99030..d8ddfc5467d6 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -953,12 +953,12 @@ static int encode_lookup(struct xdr_stream *xdr, const struct qstr *name) | |||
953 | return 0; | 953 | return 0; |
954 | } | 954 | } |
955 | 955 | ||
956 | static void encode_share_access(struct xdr_stream *xdr, int open_flags) | 956 | static void encode_share_access(struct xdr_stream *xdr, fmode_t fmode) |
957 | { | 957 | { |
958 | __be32 *p; | 958 | __be32 *p; |
959 | 959 | ||
960 | RESERVE_SPACE(8); | 960 | RESERVE_SPACE(8); |
961 | switch (open_flags & (FMODE_READ|FMODE_WRITE)) { | 961 | switch (fmode & (FMODE_READ|FMODE_WRITE)) { |
962 | case FMODE_READ: | 962 | case FMODE_READ: |
963 | WRITE32(NFS4_SHARE_ACCESS_READ); | 963 | WRITE32(NFS4_SHARE_ACCESS_READ); |
964 | break; | 964 | break; |
@@ -969,7 +969,7 @@ static void encode_share_access(struct xdr_stream *xdr, int open_flags) | |||
969 | WRITE32(NFS4_SHARE_ACCESS_BOTH); | 969 | WRITE32(NFS4_SHARE_ACCESS_BOTH); |
970 | break; | 970 | break; |
971 | default: | 971 | default: |
972 | BUG(); | 972 | WRITE32(0); |
973 | } | 973 | } |
974 | WRITE32(0); /* for linux, share_deny = 0 always */ | 974 | WRITE32(0); /* for linux, share_deny = 0 always */ |
975 | } | 975 | } |
@@ -984,7 +984,7 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena | |||
984 | RESERVE_SPACE(8); | 984 | RESERVE_SPACE(8); |
985 | WRITE32(OP_OPEN); | 985 | WRITE32(OP_OPEN); |
986 | WRITE32(arg->seqid->sequence->counter); | 986 | WRITE32(arg->seqid->sequence->counter); |
987 | encode_share_access(xdr, arg->open_flags); | 987 | encode_share_access(xdr, arg->fmode); |
988 | RESERVE_SPACE(28); | 988 | RESERVE_SPACE(28); |
989 | WRITE64(arg->clientid); | 989 | WRITE64(arg->clientid); |
990 | WRITE32(16); | 990 | WRITE32(16); |
@@ -1112,7 +1112,7 @@ static int encode_open_downgrade(struct xdr_stream *xdr, const struct nfs_closea | |||
1112 | WRITE32(OP_OPEN_DOWNGRADE); | 1112 | WRITE32(OP_OPEN_DOWNGRADE); |
1113 | WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE); | 1113 | WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE); |
1114 | WRITE32(arg->seqid->sequence->counter); | 1114 | WRITE32(arg->seqid->sequence->counter); |
1115 | encode_share_access(xdr, arg->open_flags); | 1115 | encode_share_access(xdr, arg->fmode); |
1116 | return 0; | 1116 | return 0; |
1117 | } | 1117 | } |
1118 | 1118 | ||