Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'vfs-6.19-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

- Fix a type conversion bug in the ipc subsystem

- Fix per-dentry timeout warning in autofs

- Drop the fd conversion from sockets

- Move assert from iput_not_last() to iput()

- Fix reversed check in filesystems_freeze_callback()

- Use proper uapi types for new struct delegation definitions

* tag 'vfs-6.19-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
vfs: use UAPI types for new struct delegation definition
mqueue: correct the type of ro to int
Revert "net/socket: convert sock_map_fd() to FD_ADD()"
autofs: fix per-dentry timeout warning
fs: assert on I_FREEING not being set in iput() and iput_not_last()
fs: PM: Fix reverse check in filesystems_freeze_callback()

+33 -25
+12 -10
fs/autofs/dev-ioctl.c
··· 432 432 if (!autofs_type_indirect(sbi->type)) 433 433 return -EINVAL; 434 434 435 - /* An expire timeout greater than the superblock timeout 436 - * could be a problem at shutdown but the super block 437 - * timeout itself can change so all we can really do is 438 - * warn the user. 439 - */ 440 - if (timeout >= sbi->exp_timeout) 441 - pr_warn("per-mount expire timeout is greater than " 442 - "the parent autofs mount timeout which could " 443 - "prevent shutdown\n"); 444 - 445 435 dentry = try_lookup_noperm(&QSTR_LEN(param->path, path_len), 446 436 base); 447 437 if (IS_ERR_OR_NULL(dentry)) ··· 460 470 ino->flags |= AUTOFS_INF_EXPIRE_SET; 461 471 ino->exp_timeout = timeout * HZ; 462 472 } 473 + 474 + /* An expire timeout greater than the superblock timeout 475 + * could be a problem at shutdown but the super block 476 + * timeout itself can change so all we can really do is 477 + * warn the user. 478 + */ 479 + if (ino->flags & AUTOFS_INF_EXPIRE_SET && 480 + ino->exp_timeout > sbi->exp_timeout) 481 + pr_warn("per-mount expire timeout is greater than " 482 + "the parent autofs mount timeout which could " 483 + "prevent shutdown\n"); 484 + 463 485 dput(dentry); 464 486 } 465 487
+2 -1
fs/inode.c
··· 1968 1968 1969 1969 retry: 1970 1970 lockdep_assert_not_held(&inode->i_lock); 1971 - VFS_BUG_ON_INODE(inode_state_read_once(inode) & I_CLEAR, inode); 1971 + VFS_BUG_ON_INODE(inode_state_read_once(inode) & (I_FREEING | I_CLEAR), inode); 1972 1972 /* 1973 1973 * Note this assert is technically racy as if the count is bogusly 1974 1974 * equal to one, then two CPUs racing to further drop it can both ··· 2010 2010 */ 2011 2011 void iput_not_last(struct inode *inode) 2012 2012 { 2013 + VFS_BUG_ON_INODE(inode_state_read_once(inode) & (I_FREEING | I_CLEAR), inode); 2013 2014 VFS_BUG_ON_INODE(atomic_read(&inode->i_count) < 2, inode); 2014 2015 2015 2016 WARN_ON(atomic_sub_return(1, &inode->i_count) == 0);
+1 -1
fs/super.c
··· 1189 1189 if (!sb->s_op->freeze_fs && !sb->s_op->freeze_super) 1190 1190 return; 1191 1191 1192 - if (freeze_all_ptr && !(sb->s_type->fs_flags & FS_POWER_FREEZE)) 1192 + if (!freeze_all_ptr && !(sb->s_type->fs_flags & FS_POWER_FREEZE)) 1193 1193 return; 1194 1194 1195 1195 if (!get_active_super(sb))
+3 -7
include/uapi/linux/fcntl.h
··· 4 4 5 5 #include <asm/fcntl.h> 6 6 #include <linux/openat2.h> 7 - #ifdef __KERNEL__ 8 7 #include <linux/types.h> 9 - #else 10 - #include <stdint.h> 11 - #endif 12 8 13 9 #define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0) 14 10 #define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1) ··· 86 90 87 91 /* Argument structure for F_GETDELEG and F_SETDELEG */ 88 92 struct delegation { 89 - uint32_t d_flags; /* Must be 0 */ 90 - uint16_t d_type; /* F_RDLCK, F_WRLCK, F_UNLCK */ 91 - uint16_t __pad; /* Must be 0 */ 93 + __u32 d_flags; /* Must be 0 */ 94 + __u16 d_type; /* F_RDLCK, F_WRLCK, F_UNLCK */ 95 + __u16 __pad; /* Must be 0 */ 92 96 }; 93 97 94 98 /*
+1 -1
ipc/mqueue.c
··· 887 887 } 888 888 889 889 static struct file *mqueue_file_open(struct filename *name, 890 - struct vfsmount *mnt, int oflag, bool ro, 890 + struct vfsmount *mnt, int oflag, int ro, 891 891 umode_t mode, struct mq_attr *attr) 892 892 { 893 893 struct dentry *dentry;
+14 -5
net/socket.c
··· 503 503 504 504 static int sock_map_fd(struct socket *sock, int flags) 505 505 { 506 - int fd; 507 - 508 - fd = FD_ADD(flags, sock_alloc_file(sock, flags, NULL)); 509 - if (fd < 0) 506 + struct file *newfile; 507 + int fd = get_unused_fd_flags(flags); 508 + if (unlikely(fd < 0)) { 510 509 sock_release(sock); 511 - return fd; 510 + return fd; 511 + } 512 + 513 + newfile = sock_alloc_file(sock, flags, NULL); 514 + if (!IS_ERR(newfile)) { 515 + fd_install(fd, newfile); 516 + return fd; 517 + } 518 + 519 + put_unused_fd(fd); 520 + return PTR_ERR(newfile); 512 521 } 513 522 514 523 /**