Skip to content

Commit 09f1bde

Browse files
Christoph HellwigAl Viro
authored andcommitted
fs: move vfs_fstatat out of line
This allows to keep vfs_statx static in fs/stat.c to prepare for the following changes. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0b2c669 commit 09f1bde

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

fs/stat.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static inline unsigned vfs_stat_set_lookup_flags(unsigned *lookup_flags,
181181
*
182182
* 0 will be returned on success, and a -ve error code if unsuccessful.
183183
*/
184-
int vfs_statx(int dfd, const char __user *filename, int flags,
184+
static int vfs_statx(int dfd, const char __user *filename, int flags,
185185
struct kstat *stat, u32 request_mask)
186186
{
187187
struct path path;
@@ -209,8 +209,13 @@ int vfs_statx(int dfd, const char __user *filename, int flags,
209209
out:
210210
return error;
211211
}
212-
EXPORT_SYMBOL(vfs_statx);
213212

213+
int vfs_fstatat(int dfd, const char __user *filename,
214+
struct kstat *stat, int flags)
215+
{
216+
return vfs_statx(dfd, filename, flags | AT_NO_AUTOMOUNT,
217+
stat, STATX_BASIC_STATS);
218+
}
214219

215220
#ifdef __ARCH_WANT_OLD_STAT
216221

include/linux/fs.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,15 +3162,10 @@ extern const struct inode_operations simple_symlink_inode_operations;
31623162

31633163
extern int iterate_dir(struct file *, struct dir_context *);
31643164

3165-
extern int vfs_statx(int, const char __user *, int, struct kstat *, u32);
3165+
int vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat,
3166+
int flags);
31663167
int vfs_fstat(int fd, struct kstat *stat);
31673168

3168-
static inline int vfs_fstatat(int dfd, const char __user *filename,
3169-
struct kstat *stat, int flags)
3170-
{
3171-
return vfs_statx(dfd, filename, flags | AT_NO_AUTOMOUNT,
3172-
stat, STATX_BASIC_STATS);
3173-
}
31743169
static inline int vfs_stat(const char __user *filename, struct kstat *stat)
31753170
{
31763171
return vfs_fstatat(AT_FDCWD, filename, stat, 0);

0 commit comments

Comments
 (0)