]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/proc/inode.c
Merge tag 'soc-fixes-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[people/ms/linux.git] / fs / proc / inode.c
index f130499ad8432db69e1b728d2edae0ac99e4f632..f495fdb391517a607dff7dbc495a7a50d83189a2 100644 (file)
@@ -494,6 +494,9 @@ static int proc_reg_open(struct inode *inode, struct file *file)
        typeof_member(struct proc_ops, proc_release) release;
        struct pde_opener *pdeo;
 
+       if (!pde->proc_ops->proc_lseek)
+               file->f_mode &= ~FMODE_LSEEK;
+
        if (pde_is_permanent(pde)) {
                open = pde->proc_ops->proc_open;
                if (open)