diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-20 17:08:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 19:49:28 -0400 |
commit | 63b6df14134ddd048984c8afadb46e721815bfc6 (patch) | |
tree | 7fecdc7f3ee6d9780b3fa5328a0acd1bb739b16e /fs/open.c | |
parent | 9902af79c01a8e39bb99b922fa3eef6d4ea23d69 (diff) | |
download | op-kernel-dev-63b6df14134ddd048984c8afadb46e721815bfc6.zip op-kernel-dev-63b6df14134ddd048984c8afadb46e721815bfc6.tar.gz |
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/open.c')
-rw-r--r-- | fs/open.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -713,7 +713,7 @@ static int do_dentry_open(struct file *f, } /* POSIX.1-2008/SUSv4 Section XSI 2.9.7 */ - if (S_ISREG(inode->i_mode)) + if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) f->f_mode |= FMODE_ATOMIC_POS; f->f_op = fops_get(inode->i_fop); |