mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]>
This commit is contained in:
parent
9902af79c0
commit
63b6df1413
7 changed files with 33 additions and 27 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue