diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-15 15:12:58 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-15 15:12:58 -0700 | 
| commit | 7ea30958b3054f5e488fa0b33c352723f7ab3a2a (patch) | |
| tree | f8c80fa444b384956feae1a00088a4ddd28ccea0 /fs/overlayfs | |
| parent | 5a6f65d1502551f84c158789e5d89299c78907c7 (diff) | |
| parent | 7933a585d70ee496fa341b50b8b0a95b131867ff (diff) | |
Merge tag 'vfs-6.18-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner:
 - Handle inode number mismatches in nsfs file handles
 - Update the comment to init_file()
 - Add documentation link for EBADF in the rust file code
 - Skip read lock assertion for read-only filesystems when using dax
 - Don't leak disconnected dentries during umount
 - Fix new coredump input pattern validation
 - Handle ENOIOCTLCMD conversion in vfs_fileattr_{g,s}et() correctly
 - Remove redundant IOCB_DIO_CALLER_COMP clearing in overlayfs
* tag 'vfs-6.18-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  ovl: remove redundant IOCB_DIO_CALLER_COMP clearing
  fs: return EOPNOTSUPP from file_setattr/file_getattr syscalls
  Revert "fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP"
  coredump: fix core_pattern input validation
  vfs: Don't leak disconnected dentries on umount
  dax: skip read lock assertion for read-only filesystems
  rust: file: add intra-doc link for 'EBADF'
  fs: update comment in init_file()
  nsfs: handle inode number mismatches gracefully in file handles
Diffstat (limited to 'fs/overlayfs')
| -rw-r--r-- | fs/overlayfs/copy_up.c | 2 | ||||
| -rw-r--r-- | fs/overlayfs/file.c | 5 | ||||
| -rw-r--r-- | fs/overlayfs/inode.c | 5 | 
3 files changed, 5 insertions, 7 deletions
| diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index aac7e34f56c1..604a82acd164 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -178,7 +178,7 @@ static int ovl_copy_fileattr(struct inode *inode, const struct path *old,  	err = ovl_real_fileattr_get(old, &oldfa);  	if (err) {  		/* Ntfs-3g returns -EINVAL for "no fileattr support" */ -		if (err == -EOPNOTSUPP || err == -EINVAL) +		if (err == -ENOTTY || err == -EINVAL)  			return 0;  		pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n",  			old->dentry, err); diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index fc52c796061d..7ab2c9daffd0 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -369,11 +369,6 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)  	if (!ovl_should_sync(OVL_FS(inode->i_sb)))  		ifl &= ~(IOCB_DSYNC | IOCB_SYNC); -	/* -	 * Overlayfs doesn't support deferred completions, don't copy -	 * this property in case it is set by the issuer. -	 */ -	ifl &= ~IOCB_DIO_CALLER_COMP;  	ret = backing_file_write_iter(realfile, iter, iocb, ifl, &ctx);  out_unlock: diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index aaa4cf579561..e11f310ce092 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -720,7 +720,10 @@ int ovl_real_fileattr_get(const struct path *realpath, struct file_kattr *fa)  	if (err)  		return err; -	return vfs_fileattr_get(realpath->dentry, fa); +	err = vfs_fileattr_get(realpath->dentry, fa); +	if (err == -ENOIOCTLCMD) +		err = -ENOTTY; +	return err;  }  int ovl_fileattr_get(struct dentry *dentry, struct file_kattr *fa) | 
