Centos-kernel-stream-9/fs
Jeff Moyer 5331d880be Add do_ftruncate that truncates a struct file
JIRA: https://issues.redhat.com/browse/RHEL-64867
Conflicts: Slight context difference due to out-of-order backport of
  commit abf08576afe3 ("fs: port vfs_*() helpers to struct mnt_idmap")
commit 5f0d594c602f870e3a3872f7ea42bf846a1d26cf
Author: Tony Solomonik <tony.solomonik@gmail.com>
Date:   Fri Feb 2 14:17:23 2024 +0200

    Add do_ftruncate that truncates a struct file
    
    do_sys_ftruncate receives a file descriptor, fgets the struct file, and
    finally actually truncates the file.
    
    do_ftruncate allows for passing in a file directly, with the caller
    already holding a reference to it.
    
    Signed-off-by: Tony Solomonik <tony.solomonik@gmail.com>
    Reviewed-by: Christian Brauner <brauner@kernel.org>
    Link: https://lore.kernel.org/r/20240202121724.17461-2-tony.solomonik@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 15:34:44 -05:00
..
9p fs: port inode_owner_or_capable() to mnt_idmap 2024-10-16 10:45:27 +08:00
adfs fs: port ->setattr() to pass mnt_idmap 2024-10-16 09:07:05 +08:00
affs fs: port ->rename() to pass mnt_idmap 2024-10-16 10:45:07 +08:00
afs fs: port xattr to mnt_idmap 2024-10-16 10:45:21 +08:00
autofs fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
befs
bfs fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
btrfs Merge: USB/TBT code rebase of supported drivers to upstream v6.11 2024-11-25 13:17:44 +00:00
cachefiles fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
ceph Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
coda fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
configfs Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
cramfs mm: replace vma->vm_flags direct modifications with modifier calls 2024-04-29 14:33:17 -04:00
crypto fs: port inode_owner_or_capable() to mnt_idmap 2024-10-16 10:45:27 +08:00
debugfs Merge: Wireless core and drivers rebase to v6.11 2024-11-15 13:27:52 +00:00
devpts
dlm
ecryptfs fs: port xattr to mnt_idmap 2024-10-16 10:45:21 +08:00
efivarfs fs: port ->fileattr_set() to pass mnt_idmap 2024-10-16 10:45:18 +08:00
efs
erofs fs: port ->getattr() to pass mnt_idmap 2024-10-16 09:37:45 +08:00
exfat Merge: CVE-2024-50013: exfat: fix memory leak in exfat_load_bitmap() 2024-11-27 11:19:23 +00:00
exportfs fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
ext2 Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
ext4 Merge: CVE-2024-49889: ext4: avoid use-after-free in ext4_ext_show_leaf() 2024-11-27 11:19:33 +00:00
f2fs fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
fat fs: port vfs{g,u}id helpers to mnt_idmap 2024-10-16 12:36:04 +08:00
freevxfs
fscache fs/netfs/fscache_cookie: add missing "n_accesses" check 2024-11-25 17:23:40 +00:00
fuse Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
gfs2 Merge: gfs2: Revise glock reference counting model 2024-11-28 20:19:11 +00:00
hfs fs: port xattr to mnt_idmap 2024-10-16 10:45:21 +08:00
hfsplus fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
hostfs fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
hpfs fs: port ->mknod() to pass mnt_idmap 2024-10-16 10:45:08 +08:00
hugetlbfs Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
iomap iomap: turn iomap_want_unshare_iter into an inline function 2024-11-12 09:52:41 -05:00
isofs
jbd2 jbd2: stop waiting for space when jbd2_cleanup_journal_tail() returns error 2024-11-07 15:14:36 +00:00
jffs2 fs: port acl to mnt_idmap 2024-10-16 10:45:23 +08:00
jfs quota: port to mnt_idmap 2024-10-16 10:45:31 +08:00
kernfs Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
lockd lockd: Use *-y instead of *-objs in Makefile 2024-11-05 07:34:03 -05:00
minix fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
netfs fs: Add FGP_WRITEBEGIN 2024-04-30 07:00:46 -04:00
nfs NFS: Further fixes to attribute delegation a/mtime changes 2024-11-11 07:56:37 -05:00
nfs_common fs: nfs: add missing MODULE_DESCRIPTION() macros 2024-11-05 07:33:58 -05:00
nfsd Merge: nfsd: map the EBADMSG to nfserr_io to avoid warning 2024-11-27 11:19:21 +00:00
nilfs2 fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
nls
notify fsnotify: clear PARENT_WATCHED flags lazily 2024-10-10 16:06:36 +00:00
ntfs fs: port ->setattr() to pass mnt_idmap 2024-10-16 09:07:05 +08:00
ocfs2 quota: port to mnt_idmap 2024-10-16 10:45:31 +08:00
omfs fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
openpromfs
orangefs fs: drop the timespec64 arg from generic_update_time 2024-10-25 12:35:45 -04:00
overlayfs ovl: fix null pointer dereference in ovl_permission() 2024-10-16 14:19:59 +08:00
proc Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
pstore Merge: pstore/ram: Fix crash when setting number of cpus to an odd number 2024-07-29 19:16:35 +00:00
qnx4
qnx6
quota fs: port vfs{g,u}id helpers to mnt_idmap 2024-10-16 12:36:04 +08:00
ramfs fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
reiserfs quota: port to mnt_idmap 2024-10-16 10:45:31 +08:00
romfs
smb Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
squashfs Squashfs: check the inode number is not the invalid value of zero 2024-05-17 09:25:52 -05:00
sysfs fs: sysfs: Fix reference leak in sysfs_break_active_protection() 2024-05-02 15:47:15 -04:00
sysv fs: port inode_init_owner() to mnt_idmap 2024-10-16 10:45:26 +08:00
tracefs fs: port ->mkdir() to pass mnt_idmap 2024-10-16 10:45:00 +08:00
ubifs fs: drop the timespec64 arg from generic_update_time 2024-10-25 12:35:45 -04:00
udf Merge: CVE-2024-50143: udf: fix uninit-value use in udf_get_fileshortad 2024-11-25 13:17:38 +00:00
ufs Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
unicode
vboxsf fs: port ->rename() to pass mnt_idmap 2024-10-16 10:45:07 +08:00
verity fsverity: use register_sysctl_init() to avoid kmemleak warning 2024-05-28 14:13:39 +02:00
xfs Merge: xfs, iomap: unshare range fixes 2024-11-28 20:18:58 +00:00
zonefs Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
Kconfig mm/vmemmap optimization: split hugetlb and devdax vmemmap optimization 2024-10-01 11:19:50 -04:00
Kconfig.binfmt
Makefile fs: move mnt_idmap 2024-10-16 14:19:56 +08:00
aio.c Merge: mm: update core code to v6.6 upstream 2024-10-30 07:22:28 +00:00
anon_inodes.c
attr.c Merge: Update NFS/NFSD/LOCKD/SUNRPC to upstream v6.11 for RHEL 9.6 2024-11-22 09:19:01 +00:00
bad_inode.c fs: convert to ctime accessor functions 2024-10-25 12:35:44 -04:00
binfmt_aout.c
binfmt_elf.c ELF: fix kernel.randomize_va_space double read 2024-10-03 09:00:25 -04:00
binfmt_elf_fdpic.c coredump, vmcore: Set p_align to 4 for PT_NOTE 2024-05-15 10:32:32 +08:00
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c fs: convert to ctime accessor functions 2024-10-25 12:35:44 -04:00
binfmt_script.c
buffer.c ext4: sanity check for NULL pointer after ext4_force_shutdown 2024-11-01 08:28:56 -04:00
char_dev.c
compat_binfmt_elf.c
coredump.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
d_path.c
dax.c fsdax: dax_unshare_iter needs to copy entire blocks 2024-11-12 09:52:41 -05:00
dcache.c vfs: don't mod negative dentry count when on shrinker list 2024-07-17 12:48:57 -04:00
direct-io.c fs : Fix warning using plain integer as NULL 2024-07-26 14:57:28 -04:00
drop_caches.c
eventfd.c
eventpoll.c epoll: be better about file lifetimes 2024-06-24 16:37:12 +02:00
exec.c Merge: Update arch/{x86,powerpc,arm64}/mm to v6.6 2024-11-12 08:02:20 +00:00
fcntl.c fs: port inode_owner_or_capable() to mnt_idmap 2024-10-16 10:45:27 +08:00
fhandle.c do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak 2024-05-03 10:53:50 +02:00
file.c fs: prevent out-of-bounds array speculation when closing a file descriptor 2024-08-23 14:59:51 +02:00
file_table.c fs: use __fput_sync in close(2) 2024-04-30 21:18:18 +08:00
filesystems.c
fs-writeback.c writeback: move wb_over_bg_thresh() call outside lock section 2024-09-05 20:35:09 -04:00
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
inode.c Merge: XFS: Update #2 for RHEL9.6 (upstream v6.6-6.7) 2024-11-25 13:17:37 +00:00
internal.h Add do_ftruncate that truncates a struct file 2024-11-28 15:34:44 -05:00
ioctl.c fs: port inode_owner_or_capable() to mnt_idmap 2024-10-16 10:45:27 +08:00
kernel_read_file.c
libfs.c Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
locks.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
mbcache.c
mnt_idmapping.c fs: move mnt_idmap 2024-10-16 14:19:56 +08:00
mount.h
mpage.c mpage: use folios in bio end_io handler 2024-04-30 07:00:57 -04:00
namei.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
namespace.c fs: move mnt_idmap 2024-10-16 14:19:56 +08:00
nsfs.c fs: convert to ctime accessor functions 2024-10-25 12:35:44 -04:00
open.c Add do_ftruncate that truncates a struct file 2024-11-28 15:34:44 -05:00
pipe.c fs: convert to ctime accessor functions 2024-10-25 12:35:44 -04:00
pnode.c
pnode.h
posix_acl.c fs: convert to ctime accessor functions 2024-10-25 12:35:44 -04:00
proc_namespace.c tty, proc, kernfs, random: Use copy_splice_read() 2024-09-05 20:35:54 -04:00
read_write.c fs: Initial atomic write support 2024-09-27 11:19:09 +08:00
readdir.c
remap_range.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
select.c
seq_file.c use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
signalfd.c signalfd: fix error return code 2024-09-27 11:19:18 +08:00
splice.c splice: kdoc for filemap_splice_read() and copy_splice_read() 2024-09-05 20:35:56 -04:00
stack.c fs: convert to ctime accessor functions 2024-10-25 12:35:44 -04:00
stat.c Merge: Update NFS/NFSD/LOCKD/SUNRPC to upstream v6.11 for RHEL 9.6 2024-11-22 09:19:01 +00:00
statfs.c
super.c Revert "mm: shrinkers: convert shrinker_rwsem to mutex" 2024-04-30 07:01:18 -04:00
sync.c
sysctls.c
timerfd.c timerfd: convert to ->read_iter() 2024-09-27 11:18:55 +08:00
userfaultfd.c Merge: mm: update core code to v6.6 upstream 2024-10-30 07:22:28 +00:00
utimes.c fs: port vfs_*() helpers to struct mnt_idmap 2024-10-16 08:29:51 +08:00
xattr.c Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00