diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 11:35:00 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 11:35:00 -0800 |
commit | 72cca7baf4fba777b8ab770b902cf2e08941773f (patch) | |
tree | c5cdbcd65ac166946f54f1dd6ef3693eea29d791 /drivers/staging/lustre/lustre/llite/statahead.c | |
parent | 5266e70335dac35c35b5ca9cea4251c1389d4a68 (diff) | |
parent | 3e0f9b2ca8e4839335e4d64ec0a75f4fd5111c4b (diff) | |
download | op-kernel-dev-72cca7baf4fba777b8ab770b902cf2e08941773f.zip op-kernel-dev-72cca7baf4fba777b8ab770b902cf2e08941773f.tar.gz |
Merge tag 'staging-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO updates from Greg KH:
"Here's the "big" staging/iio pull request for 4.10-rc1.
Not as big as 4.9 was, but still just over a thousand changes. We
almost broke even of lines added vs. removed, as the slicoss driver
was removed (got a "clean" driver for the same hardware through the
netdev tree), and some iio drivers were also dropped, but I think we
ended up adding a few thousand lines to the source tree in the end.
Other than that it's a lot of minor fixes all over the place, nothing
major stands out at all.
All of these have been in linux-next for a while. There will be a
merge conflict with Al's vfs tree in the lustre code, but the
resolution for that should be pretty simple, that too has been in
linux-next"
* tag 'staging-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1002 commits)
staging: comedi: comedidev.h: Document usage of 'detach' handler
staging: fsl-mc: remove unnecessary info prints from bus driver
staging: fsl-mc: add sysfs ABI doc
staging/lustre/o2iblnd: Fix misspelled attemps->attempts
staging/lustre/o2iblnd: Fix misspelling intialized->intialized
staging/lustre: Convert all bare unsigned to unsigned int
staging/lustre/socklnd: Fix whitespace problem
staging/lustre/o2iblnd: Add missing space
staging/lustre/lnetselftest: Fix potential integer overflow
staging: greybus: audio_module: remove redundant OOM message
staging: dgnc: Fix lines longer than 80 characters
staging: dgnc: fix blank line after '{' warnings.
staging/android: remove Sync Framework tasks from TODO
staging/lustre/osc: Revert erroneous list_for_each_entry_safe use
staging: slicoss: remove the staging driver
staging: lustre: libcfs: remove lnet upcall code
staging: lustre: remove set but unused variables
staging: lustre: osc: set lock data for readahead lock
staging: lustre: import: don't reconnect during connect interpret
staging: lustre: clio: remove mtime check in vvp_io_fault_start()
...
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/statahead.c')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/statahead.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index 0677513..4769a22 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -659,8 +659,8 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, struct ll_inode_info *lli = ll_i2info(dir); struct ll_statahead_info *sai = lli->lli_sai; struct sa_entry *entry = (struct sa_entry *)minfo->mi_cbdata; + wait_queue_head_t *waitq = NULL; __u64 handle = 0; - bool wakeup; if (it_disposition(it, DISP_LOOKUP_NEG)) rc = -ENOENT; @@ -693,7 +693,8 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, spin_lock(&lli->lli_sa_lock); if (rc) { - wakeup = __sa_make_ready(sai, entry, rc); + if (__sa_make_ready(sai, entry, rc)) + waitq = &sai->sai_waitq; } else { entry->se_minfo = minfo; entry->se_req = ptlrpc_request_addref(req); @@ -704,13 +705,15 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, * with parent's lock held, for example: unlink. */ entry->se_handle = handle; - wakeup = !sa_has_callback(sai); + if (!sa_has_callback(sai)) + waitq = &sai->sai_thread.t_ctl_waitq; + list_add_tail(&entry->se_list, &sai->sai_interim_entries); } sai->sai_replied++; - if (wakeup) - wake_up(&sai->sai_thread.t_ctl_waitq); + if (waitq) + wake_up(waitq); spin_unlock(&lli->lli_sa_lock); return rc; @@ -1397,10 +1400,10 @@ static int revalidate_statahead_dentry(struct inode *dir, struct dentry **dentryp, bool unplug) { + struct ll_inode_info *lli = ll_i2info(dir); struct sa_entry *entry = NULL; struct l_wait_info lwi = { 0 }; struct ll_dentry_data *ldd; - struct ll_inode_info *lli; int rc = 0; if ((*dentryp)->d_name.name[0] == '.') { @@ -1446,7 +1449,9 @@ static int revalidate_statahead_dentry(struct inode *dir, sa_handle_callback(sai); if (!sa_ready(entry)) { + spin_lock(&lli->lli_sa_lock); sai->sai_index_wait = entry->se_index; + spin_unlock(&lli->lli_sa_lock); lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(30), NULL, LWI_ON_SIGNAL_NOOP, NULL); rc = l_wait_event(sai->sai_waitq, sa_ready(entry), &lwi); @@ -1475,6 +1480,7 @@ static int revalidate_statahead_dentry(struct inode *dir, alias = ll_splice_alias(inode, *dentryp); if (IS_ERR(alias)) { + ll_intent_release(&it); rc = PTR_ERR(alias); goto out_unplug; } @@ -1493,6 +1499,7 @@ static int revalidate_statahead_dentry(struct inode *dir, *dentryp, PFID(ll_inode2fid((*dentryp)->d_inode)), PFID(ll_inode2fid(inode))); + ll_intent_release(&it); rc = -ESTALE; goto out_unplug; } @@ -1512,7 +1519,6 @@ out_unplug: * dentry_may_statahead(). */ ldd = ll_d2d(*dentryp); - lli = ll_i2info(dir); /* ldd can be NULL if llite lookup failed. */ if (ldd) ldd->lld_sa_generation = lli->lli_sa_generation; |