--- x/fs/overlayfs/file.c +++ y/fs/overlayfs/file.c @@ -204,6 +204,7 @@ static loff_t ovl_llseek(struct file *fi if (ret) return ret; + inode_lock(inode); /* * Overlay file f_pos is the master copy that is preserved * through copy up and modified on read/write, but only real @@ -220,6 +221,7 @@ static loff_t ovl_llseek(struct file *fi file->f_pos = real.file->f_pos; ovl_inode_unlock(inode); + inode_unlock(inode); fdput(real);