Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFSv4: The link() operation should return any delegation on the file
NFSv4: Fix two unbalanced put_rpccred() issues.
NFSv4: Fix a bug when the server returns NFS4ERR_RESOURCE
nfs: Panic when commit fails

+11 -8
+2
fs/nfs/dir.c
··· 1536 1536 old_dentry->d_parent->d_name.name, old_dentry->d_name.name, 1537 1537 dentry->d_parent->d_name.name, dentry->d_name.name); 1538 1538 1539 + nfs_inode_return_delegation(inode); 1540 + 1539 1541 d_drop(dentry); 1540 1542 error = NFS_PROTO(dir)->link(inode, dir, &dentry->d_name); 1541 1543 if (error == 0) {
+1
fs/nfs/direct.c
··· 457 457 }; 458 458 struct rpc_task_setup task_setup_data = { 459 459 .rpc_client = NFS_CLIENT(inode), 460 + .rpc_message = &msg, 460 461 .callback_ops = &nfs_write_direct_ops, 461 462 .workqueue = nfsiod_workqueue, 462 463 .flags = RPC_TASK_ASYNC,
+8 -7
fs/nfs/nfs4proc.c
··· 72 72 /* Prevent leaks of NFSv4 errors into userland */ 73 73 static int nfs4_map_errors(int err) 74 74 { 75 - if (err < -1000) { 75 + if (err >= -1000) 76 + return err; 77 + switch (err) { 78 + case -NFS4ERR_RESOURCE: 79 + return -EREMOTEIO; 80 + default: 76 81 dprintk("%s could not handle NFSv4 error %d\n", 77 82 __func__, -err); 78 - return -EIO; 83 + break; 79 84 } 80 - return err; 85 + return -EIO; 81 86 } 82 87 83 88 /* ··· 3065 3060 if (time_before(clp->cl_last_renewal,timestamp)) 3066 3061 clp->cl_last_renewal = timestamp; 3067 3062 spin_unlock(&clp->cl_lock); 3068 - dprintk("%s calling put_rpccred on rpc_cred %p\n", __func__, 3069 - task->tk_msg.rpc_cred); 3070 - put_rpccred(task->tk_msg.rpc_cred); 3071 3063 } 3072 3064 3073 3065 static const struct rpc_call_ops nfs4_renew_ops = { ··· 4879 4877 nfs41_sequence_free_slot(clp, task->tk_msg.rpc_resp); 4880 4878 dprintk("%s rpc_cred %p\n", __func__, task->tk_msg.rpc_cred); 4881 4879 4882 - put_rpccred(task->tk_msg.rpc_cred); 4883 4880 kfree(task->tk_msg.rpc_argp); 4884 4881 kfree(task->tk_msg.rpc_resp); 4885 4882
-1
fs/nfs/nfs4xdr.c
··· 5681 5681 { NFS4ERR_SERVERFAULT, -ESERVERFAULT }, 5682 5682 { NFS4ERR_BADTYPE, -EBADTYPE }, 5683 5683 { NFS4ERR_LOCKED, -EAGAIN }, 5684 - { NFS4ERR_RESOURCE, -EREMOTEIO }, 5685 5684 { NFS4ERR_SYMLINK, -ELOOP }, 5686 5685 { NFS4ERR_OP_ILLEGAL, -EOPNOTSUPP }, 5687 5686 { NFS4ERR_DEADLOCK, -EDEADLK },