Centos-kernel-stream-9/fs/xfs/xfs_symlink.h

18 lines
544 B
C
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2012 Red Hat, Inc. All rights reserved.
*/
#ifndef __XFS_SYMLINK_H
#define __XFS_SYMLINK_H 1
/* Kernel only symlink definitions */
fs: port inode_init_owner() to mnt_idmap JIRA: https://issues.redhat.com/browse/RHEL-33888 Status: Linus Conflicts: For consistency drop btrfs hunks because it isn't supported in CentOS Stream and other backports also drop such hunks. CentOS Stream does not have upstream commit 3db1de0e582c3 ("f2fs: change the current atomic write way") so there is no call to f2fs_get_tmpfile() in f2fs_ioc_start_atomic_write() to change. The above patch also adds the definition of f2fs_get_tmpfile() to fs/f2fs/f2fs.h so it's not there to change resulting in a hunk reject for fs/f2fs/f2fs.h. Upstream commit 787caf1bdcd9f ("f2fs: fix to enable compress for newly created file if extension matches") is not present in CentOS Stream resulting in a number of rejects against fs/f2fs/namei.c, manually apply these changes. Dropped hunks for ntfs3 because the source is not present in the CentOS Stream source tree. CentOS Stream commit 892da692fa5bc ("shmem: support idmapped mounts for tmpfs") which causes a reject in fs/shmem.c, manually apply the hunk (note: taking account of these changes at the times they are needed will result in an updated mm/shmem.c once this series is completed). Update to add incremental changes needed due to CentOS Stream commit 469e1d13f6e5f ("shmem: quota support"). commit f2d40141d5d90b882e2c35b226f9244a63b82b6e Author: Christian Brauner <brauner@kernel.org> Date: Fri Jan 13 12:49:25 2023 +0100 fs: port inode_init_owner() to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org> Signed-off-by: Ian Kent <ikent@redhat.com>
2024-05-23 02:34:21 +00:00
int xfs_symlink(struct mnt_idmap *idmap, struct xfs_inode *dp,
struct xfs_name *link_name, const char *target_path,
umode_t mode, struct xfs_inode **ipp);
int xfs_readlink_bmap_ilocked(struct xfs_inode *ip, char *link);
int xfs_readlink(struct xfs_inode *ip, char *link);
int xfs_inactive_symlink(struct xfs_inode *ip);
#endif /* __XFS_SYMLINK_H */