Commit b8e6dece authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-3.15' of git://linux-nfs.org/~bfields/linux

Pull nfsd bugfixes from Bruce Fields:
 "Three small nfsd bugfixes (including one locks.c fix for a bug
  triggered only from nfsd).

  Jeff's patches are for long-existing problems that became easier to
  trigger since the addition of vfs delegation support"

* 'for-3.15' of git://linux-nfs.org/~bfields/linux:
  Revert "nfsd4: fix nfs4err_resource in 4.1 case"
  nfsd: set timeparms.to_maxval in setup_callback_client
  locks: allow __break_lease to sleep even when break_time is 0
parents 76429f1d fc208d02
...@@ -1391,11 +1391,10 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type) ...@@ -1391,11 +1391,10 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
restart: restart:
break_time = flock->fl_break_time; break_time = flock->fl_break_time;
if (break_time != 0) { if (break_time != 0)
break_time -= jiffies; break_time -= jiffies;
if (break_time == 0) if (break_time == 0)
break_time++; break_time++;
}
locks_insert_block(flock, new_fl); locks_insert_block(flock, new_fl);
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
error = wait_event_interruptible_timeout(new_fl->fl_wait, error = wait_event_interruptible_timeout(new_fl->fl_wait,
......
...@@ -654,9 +654,11 @@ static struct rpc_clnt *create_backchannel_client(struct rpc_create_args *args) ...@@ -654,9 +654,11 @@ static struct rpc_clnt *create_backchannel_client(struct rpc_create_args *args)
static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses) static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses)
{ {
int maxtime = max_cb_time(clp->net);
struct rpc_timeout timeparms = { struct rpc_timeout timeparms = {
.to_initval = max_cb_time(clp->net), .to_initval = maxtime,
.to_retries = 0, .to_retries = 0,
.to_maxval = maxtime,
}; };
struct rpc_create_args args = { struct rpc_create_args args = {
.net = clp->net, .net = clp->net,
......
...@@ -3627,14 +3627,6 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op) ...@@ -3627,14 +3627,6 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op)
/* nfsd4_check_resp_size guarantees enough room for error status */ /* nfsd4_check_resp_size guarantees enough room for error status */
if (!op->status) if (!op->status)
op->status = nfsd4_check_resp_size(resp, 0); op->status = nfsd4_check_resp_size(resp, 0);
if (op->status == nfserr_resource && nfsd4_has_session(&resp->cstate)) {
struct nfsd4_slot *slot = resp->cstate.slot;
if (slot->sl_flags & NFSD4_SLOT_CACHETHIS)
op->status = nfserr_rep_too_big_to_cache;
else
op->status = nfserr_rep_too_big;
}
if (so) { if (so) {
so->so_replay.rp_status = op->status; so->so_replay.rp_status = op->status;
so->so_replay.rp_buflen = (char *)resp->p - (char *)(statp+1); so->so_replay.rp_buflen = (char *)resp->p - (char *)(statp+1);
......
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