You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
kill vfs_stat_fd / vfs_lstat_fd
There's really no reason to keep vfs_stat_fd and vfs_lstat_fd with Oleg's vfs_fstatat. Use vfs_fstatat for the few cases having the directory fd, and switch all others to vfs_stat / vfs_lstat. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
committed by
Al Viro
parent
0112fc2229
commit
2eae7a1874
+10
-8
@@ -181,22 +181,24 @@ asmlinkage long compat_sys_newstat(char __user * filename,
|
||||
struct compat_stat __user *statbuf)
|
||||
{
|
||||
struct kstat stat;
|
||||
int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
|
||||
int error;
|
||||
|
||||
if (!error)
|
||||
error = cp_compat_stat(&stat, statbuf);
|
||||
return error;
|
||||
error = vfs_stat(filename, &stat);
|
||||
if (error)
|
||||
return error;
|
||||
return cp_compat_stat(&stat, statbuf);
|
||||
}
|
||||
|
||||
asmlinkage long compat_sys_newlstat(char __user * filename,
|
||||
struct compat_stat __user *statbuf)
|
||||
{
|
||||
struct kstat stat;
|
||||
int error = vfs_lstat_fd(AT_FDCWD, filename, &stat);
|
||||
int error;
|
||||
|
||||
if (!error)
|
||||
error = cp_compat_stat(&stat, statbuf);
|
||||
return error;
|
||||
error = vfs_lstat(filename, &stat);
|
||||
if (error)
|
||||
return error;
|
||||
return cp_compat_stat(&stat, statbuf);
|
||||
}
|
||||
|
||||
#ifndef __ARCH_WANT_STAT64
|
||||
|
||||
Reference in New Issue
Block a user