Commit f3016267 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] NFS: fix for older gcc's

From: Trond Myklebust <trond.myklebust@fys.uio.no>

Fix for proper C99 designated initializer, and avoid warning from
missing (unreachable - but gcc doesn't know it) return.
parent fa36f31a
...@@ -2061,6 +2061,7 @@ nfs4_lck_type(int cmd, struct file_lock *request) ...@@ -2061,6 +2061,7 @@ nfs4_lck_type(int cmd, struct file_lock *request)
return NFS4_WRITE_LT; return NFS4_WRITE_LT;
} }
BUG(); BUG();
return 0;
} }
static inline uint64_t static inline uint64_t
...@@ -2208,7 +2209,9 @@ nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) ...@@ -2208,7 +2209,9 @@ nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
if (lsp == NULL) { if (lsp == NULL) {
struct nfs4_state_owner *owner = state->owner; struct nfs4_state_owner *owner = state->owner;
struct nfs_open_to_lock otl = { struct nfs_open_to_lock otl = {
.lock_owner.clientid = server->nfs4_state->cl_clientid, .lock_owner = {
.clientid = server->nfs4_state->cl_clientid,
},
}; };
status = -ENOMEM; status = -ENOMEM;
lsp = nfs4_alloc_lock_state(state, request->fl_owner); lsp = nfs4_alloc_lock_state(state, request->fl_owner);
......
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