···784784 return v;785785}786786787787+void __f_unlock_pos(struct file *f)788788+{789789+ mutex_unlock(&f->f_pos_lock);790790+}791791+787792/*788793 * We only lock f_pos if we have threads or if the file might be789794 * shared with another process. In both cases we'll have an elevated
+1-1
fs/open.c
···713713 }714714715715 /* POSIX.1-2008/SUSv4 Section XSI 2.9.7 */716716- if (S_ISREG(inode->i_mode))716716+ if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))717717 f->f_mode |= FMODE_ATOMIC_POS;718718719719 f->f_op = fops_get(inode->i_fop);