Skip to contentSkip to conversation

autofs4 - fix deal with autofs4_write races

PATCH In review Ian Kent 2 participants 2 messages Jan 13, 2012

lore
Share & tools
lore

Ian Kent

author
#0 lore raw

PATCH 1/1 autofs4 - fix deal with autofs4_write races

I don't know how I missed this obvious mistake when I reviewed Als' patches, sorry.

---

 fs/autofs4/waitq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/autofs4/waitq.c +1 -1
index 9ef5b29..da8876d 100644
@@ -76,7 +76,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,
 		data += wr;
 		bytes -= wr;
 	}
-	mutex_lock(&sbi->pipe_mutex);
+	mutex_unlock(&sbi->pipe_mutex);
 
 	set_fs(fs);
 
Tested-by on v1 1/1
#1 lore raw
Quoted 4 lines · Ian Kent

I don't know how I missed this obvious mistake when I reviewed Als' patches, sorry.

Same as Al's one I acked earlier.

Dave.

Quoted 19 lines

---

 fs/autofs4/waitq.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
fs/autofs4/waitq.c +1 -1
index 9ef5b29..da8876d 100644
@@ -76,7 +76,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,
                data += wr;
                bytes -= wr;
        }
-       mutex_lock(&sbi->pipe_mutex);
+       mutex_unlock(&sbi->pipe_mutex);
 
        set_fs(fs);