mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
NFS client fixes for 3.17
Highlights: - Fix a kernel warning when removing /proc/net/nfsfs - Revert commit49a4bda22e
due to Oopses - Fix a typo in the pNFS file layout commit code -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUEyYLAAoJEGcL54qWCgDylFwP/08KZad4r9Od5cONfv4LmaKu a+8s/ys9haoA4vaNCm1HTH216pJUUC2S31P1AZUzDoIt3Eox8QCa7VhMztoGC1G3 U+3/k7LmBzNfJCeNcvr5WV/o/QMMbB6QJ4wQWoBOx5H+hqDuEnMd/BBMaU1qEcGa 8AzAlPTCnNJyg+mah6xHOTx21WfukaVVJtWHKrY1vcN8cYTgaOm0vHqRQQraBYfX lIFH55+wKuxa+IbPV6NZ3yl7HG963IYtUkP3faRlXh91616Xthbec3yhyuoxvZzd 5oRxPwtLIPP47kwAL0nJVGxI4wDE8q2a35kv8akw0waLGzWab6NmI5MADBamrZOP Vnv4wlrE5vgDvIEG42oKfPCRo5qB+Nc79wQzQ62pDRT+OkB9PbYtIc+n/l8HD8jm JfH09duW203D8llbJLa/YeJSQC9BeV1coyduB9WTDZBNVrAQPAVgWMO+XZLCGGFR l5f6vNNQbgCFx9hewCnnv0COUJuf4/MN3mKYRSO/zH/oRR7rfFnqmHtD2rwqOizk PPaF6qXY8IY4NIj0UF1JYFYFLPN65z1JI+XOfDSfGhdGVrWEXtkC2k1tEhIQ71rU 1riULq67vGFfPG4SJ43Xf2JwvcpFni2VguFeOw05xRsC2RioRbzr3GucWVGsxQ66 cK2AS2MEcBYFWqodXZky =+QUa -----END PGP SIGNATURE----- Merge tag 'nfs-for-3.17-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client fixes from Trond Myklebust: "Highlights: - fix a kernel warning when removing /proc/net/nfsfs - revert commit49a4bda22e
due to Oopses - fix a typo in the pNFS file layout commit code" * tag 'nfs-for-3.17-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: pnfs: fix filelayout_retry_commit when idx > 0 nfs: revert "nfs4: queue free_lock_state job submission to nfsiod" nfs: fix kernel warning when removing proc entry
This commit is contained in:
commit
602b536629
@ -1412,24 +1412,18 @@ int nfs_fs_proc_net_init(struct net *net)
|
||||
p = proc_create("volumes", S_IFREG|S_IRUGO,
|
||||
nn->proc_nfsfs, &nfs_volume_list_fops);
|
||||
if (!p)
|
||||
goto error_2;
|
||||
goto error_1;
|
||||
return 0;
|
||||
|
||||
error_2:
|
||||
remove_proc_entry("servers", nn->proc_nfsfs);
|
||||
error_1:
|
||||
remove_proc_entry("fs/nfsfs", NULL);
|
||||
remove_proc_subtree("nfsfs", net->proc_net);
|
||||
error_0:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
void nfs_fs_proc_net_exit(struct net *net)
|
||||
{
|
||||
struct nfs_net *nn = net_generic(net, nfs_net_id);
|
||||
|
||||
remove_proc_entry("volumes", nn->proc_nfsfs);
|
||||
remove_proc_entry("servers", nn->proc_nfsfs);
|
||||
remove_proc_entry("fs/nfsfs", NULL);
|
||||
remove_proc_subtree("nfsfs", net->proc_net);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1269,11 +1269,12 @@ filelayout_search_commit_reqs(struct nfs_commit_info *cinfo, struct page *page)
|
||||
static void filelayout_retry_commit(struct nfs_commit_info *cinfo, int idx)
|
||||
{
|
||||
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
|
||||
struct pnfs_commit_bucket *bucket = fl_cinfo->buckets;
|
||||
struct pnfs_commit_bucket *bucket;
|
||||
struct pnfs_layout_segment *freeme;
|
||||
int i;
|
||||
|
||||
for (i = idx; i < fl_cinfo->nbuckets; i++, bucket++) {
|
||||
for (i = idx; i < fl_cinfo->nbuckets; i++) {
|
||||
bucket = &fl_cinfo->buckets[i];
|
||||
if (list_empty(&bucket->committing))
|
||||
continue;
|
||||
nfs_retry_commit(&bucket->committing, bucket->clseg, cinfo);
|
||||
|
@ -130,16 +130,15 @@ enum {
|
||||
*/
|
||||
|
||||
struct nfs4_lock_state {
|
||||
struct list_head ls_locks; /* Other lock stateids */
|
||||
struct nfs4_state * ls_state; /* Pointer to open state */
|
||||
struct list_head ls_locks; /* Other lock stateids */
|
||||
struct nfs4_state * ls_state; /* Pointer to open state */
|
||||
#define NFS_LOCK_INITIALIZED 0
|
||||
#define NFS_LOCK_LOST 1
|
||||
unsigned long ls_flags;
|
||||
unsigned long ls_flags;
|
||||
struct nfs_seqid_counter ls_seqid;
|
||||
nfs4_stateid ls_stateid;
|
||||
atomic_t ls_count;
|
||||
fl_owner_t ls_owner;
|
||||
struct work_struct ls_release;
|
||||
nfs4_stateid ls_stateid;
|
||||
atomic_t ls_count;
|
||||
fl_owner_t ls_owner;
|
||||
};
|
||||
|
||||
/* bits for nfs4_state->flags */
|
||||
|
@ -799,18 +799,6 @@ __nfs4_find_lock_state(struct nfs4_state *state, fl_owner_t fl_owner)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
free_lock_state_work(struct work_struct *work)
|
||||
{
|
||||
struct nfs4_lock_state *lsp = container_of(work,
|
||||
struct nfs4_lock_state, ls_release);
|
||||
struct nfs4_state *state = lsp->ls_state;
|
||||
struct nfs_server *server = state->owner->so_server;
|
||||
struct nfs_client *clp = server->nfs_client;
|
||||
|
||||
clp->cl_mvops->free_lock_state(server, lsp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a compatible lock_state. If no initialized lock_state structure
|
||||
* exists, return an uninitialized one.
|
||||
@ -832,7 +820,6 @@ static struct nfs4_lock_state *nfs4_alloc_lock_state(struct nfs4_state *state, f
|
||||
if (lsp->ls_seqid.owner_id < 0)
|
||||
goto out_free;
|
||||
INIT_LIST_HEAD(&lsp->ls_locks);
|
||||
INIT_WORK(&lsp->ls_release, free_lock_state_work);
|
||||
return lsp;
|
||||
out_free:
|
||||
kfree(lsp);
|
||||
@ -896,12 +883,13 @@ void nfs4_put_lock_state(struct nfs4_lock_state *lsp)
|
||||
if (list_empty(&state->lock_states))
|
||||
clear_bit(LK_STATE_IN_USE, &state->flags);
|
||||
spin_unlock(&state->state_lock);
|
||||
if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags))
|
||||
queue_work(nfsiod_workqueue, &lsp->ls_release);
|
||||
else {
|
||||
server = state->owner->so_server;
|
||||
server = state->owner->so_server;
|
||||
if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags)) {
|
||||
struct nfs_client *clp = server->nfs_client;
|
||||
|
||||
clp->cl_mvops->free_lock_state(server, lsp);
|
||||
} else
|
||||
nfs4_free_lock_state(server, lsp);
|
||||
}
|
||||
}
|
||||
|
||||
static void nfs4_fl_copy_lock(struct file_lock *dst, struct file_lock *src)
|
||||
|
Loading…
Reference in New Issue
Block a user