summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-mod.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-23 01:47:47 +0100
committerMike Marshall <hubcap@omnibond.com>2016-01-23 19:03:12 +0100
commited42fe059389daa35a2aa10ec832e9f8d0a9e59e (patch)
tree778e6ebb516e7a6301305b077e31ee40d9fe96c2 /fs/orangefs/orangefs-mod.c
parentorangefs: make sure that reopening pvfs2-req won't overlap with the end of close (diff)
downloadlinux-ed42fe059389daa35a2aa10ec832e9f8d0a9e59e.tar.xz
linux-ed42fe059389daa35a2aa10ec832e9f8d0a9e59e.zip
orangefs: hopefully saner op refcounting and locking
* create with refcount 1 * make op_release() decrement and free if zero (i.e. old put_op() has become that). * mark when submitter has given up waiting; from that point nobody else can move between the lists, change state, etc. * have daemon read/write_iter grab a reference when picking op and *always* give it up in the end * don't put into hash until we know it's been successfully passed to daemon * move op->lock _lower_ than htab_in_progress_lock (and make sure to take it in purge_inprogress_ops()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-mod.c')
-rw-r--r--fs/orangefs/orangefs-mod.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c
index bd9fbfe2ccee..e07874e26372 100644
--- a/fs/orangefs/orangefs-mod.c
+++ b/fs/orangefs/orangefs-mod.c
@@ -271,6 +271,7 @@ void purge_inprogress_ops(void)
struct orangefs_kernel_op_s *op;
struct orangefs_kernel_op_s *next;
+ spin_lock(&htable_ops_in_progress_lock);
list_for_each_entry_safe(op,
next,
&htable_ops_in_progress[i],
@@ -284,6 +285,7 @@ void purge_inprogress_ops(void)
set_op_state_purged(op);
spin_unlock(&op->lock);
}
+ spin_unlock(&htable_ops_in_progress_lock);
}
}