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.

statx: switch to CLASS(filename_maybe_null)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro a4503461 ef7282e8

+5 -13
+5 -13
fs/stat.c
··· 365 365 int vfs_fstatat(int dfd, const char __user *filename, 366 366 struct kstat *stat, int flags) 367 367 { 368 - int ret; 369 - int statx_flags = flags | AT_NO_AUTOMOUNT; 370 - struct filename *name = getname_maybe_null(filename, flags); 368 + CLASS(filename_maybe_null, name)(filename, flags); 371 369 372 370 if (!name && dfd >= 0) 373 371 return vfs_fstat(dfd, stat); 374 372 375 - ret = vfs_statx(dfd, name, statx_flags, stat, STATX_BASIC_STATS); 376 - putname(name); 377 - 378 - return ret; 373 + return vfs_statx(dfd, name, flags | AT_NO_AUTOMOUNT, 374 + stat, STATX_BASIC_STATS); 379 375 } 380 376 381 377 #ifdef __ARCH_WANT_OLD_STAT ··· 806 810 unsigned int, mask, 807 811 struct statx __user *, buffer) 808 812 { 809 - int ret; 810 - struct filename *name = getname_maybe_null(filename, flags); 813 + CLASS(filename_maybe_null, name)(filename, flags); 811 814 812 815 if (!name && dfd >= 0) 813 816 return do_statx_fd(dfd, flags & ~AT_NO_AUTOMOUNT, mask, buffer); 814 817 815 - ret = do_statx(dfd, name, flags, mask, buffer); 816 - putname(name); 817 - 818 - return ret; 818 + return do_statx(dfd, name, flags, mask, buffer); 819 819 } 820 820 821 821 #if defined(CONFIG_COMPAT) && defined(__ARCH_WANT_COMPAT_STAT)