Skip to contentSkip to conversation

mutex_unlock() later in seq_lseek()

PATCH New Alexey Dobriyan 1 participant 1 message May 29, 2007 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mutex_unlock() later in seq_lseek()

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"

---

 fs/seq_file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/seq_file.c +1 -1
@@ -260,8 +260,8 @@ loff_t seq_lseek(struct file *file, loff
 				}
 			}
 	}
-	mutex_unlock(&m->lock);
 	file->f_version = m->version;
+	mutex_unlock(&m->lock);
 	return retval;
 }
 EXPORT_SYMBOL(seq_lseek);