summaryrefslogtreecommitdiff
path: root/fs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-20 17:08:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-02 19:49:28 -0400
commit63b6df14134ddd048984c8afadb46e721815bfc6 (patch)
tree7fecdc7f3ee6d9780b3fa5328a0acd1bb739b16e /fs/file.c
parent9902af79c01a8e39bb99b922fa3eef6d4ea23d69 (diff)
give readdir(2)/getdents(2)/etc. uniform exclusion with lseek()
same as read() on regular files has, and for the same reason. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/file.c b/fs/file.c
index 1fbc5c0555a9..6b1acdfe59da 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -784,6 +784,11 @@ unsigned long __fdget_pos(unsigned int fd)
return v;
}
+void __f_unlock_pos(struct file *f)
+{
+ mutex_unlock(&f->f_pos_lock);
+}
+
/*
* We only lock f_pos if we have threads or if the file might be
* shared with another process. In both cases we'll have an elevated