mutex_unlock() later in seq_lseek()
authorAlexey Dobriyan <adobriyan@sw.ru>
Mon, 16 Jul 2007 06:40:22 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:44 +0000 (09:05 -0700)
All manipulations with struct seq_file::version are done under
struct seq_file::lock except one introduced in commit
d6b7a781c51c91dd054e5c437885205592faac21
aka "[PATCH] Speed up /proc/pid/maps"

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/seq_file.c

index 49194a4e6b91ba9dcd22c3aa7fe81f794aca4413..e8e51db4989d9123bd0d8c6eb13a3a0346bf30e7 100644 (file)
@@ -260,8 +260,8 @@ loff_t seq_lseek(struct file *file, loff_t offset, int origin)
                                }
                        }
        }
-       mutex_unlock(&m->lock);
        file->f_version = m->version;
+       mutex_unlock(&m->lock);
        return retval;
 }
 EXPORT_SYMBOL(seq_lseek);