stat.c (825cf206ed510c4a1758bef8957e2b039253e2e3) | stat.c (2d985f8c6b91b5007a16e640bb9c038c5fb2839b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/stat.c 4 * 5 * Copyright (C) 1991, 1992 Linus Torvalds 6 */ 7 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/stat.c 4 * 5 * Copyright (C) 1991, 1992 Linus Torvalds 6 */ 7 |
8#include <linux/blkdev.h> |
|
8#include <linux/export.h> 9#include <linux/mm.h> 10#include <linux/errno.h> 11#include <linux/file.h> 12#include <linux/highuid.h> 13#include <linux/fs.h> 14#include <linux/namei.h> 15#include <linux/security.h> --- 209 unchanged lines hidden (view full) --- 225 return -EINVAL; 226 227retry: 228 error = filename_lookup(dfd, filename, lookup_flags, &path, NULL); 229 if (error) 230 goto out; 231 232 error = vfs_getattr(&path, stat, request_mask, flags); | 9#include <linux/export.h> 10#include <linux/mm.h> 11#include <linux/errno.h> 12#include <linux/file.h> 13#include <linux/highuid.h> 14#include <linux/fs.h> 15#include <linux/namei.h> 16#include <linux/security.h> --- 209 unchanged lines hidden (view full) --- 226 return -EINVAL; 227 228retry: 229 error = filename_lookup(dfd, filename, lookup_flags, &path, NULL); 230 if (error) 231 goto out; 232 233 error = vfs_getattr(&path, stat, request_mask, flags); |
234 |
|
233 stat->mnt_id = real_mount(path.mnt)->mnt_id; 234 stat->result_mask |= STATX_MNT_ID; | 235 stat->mnt_id = real_mount(path.mnt)->mnt_id; 236 stat->result_mask |= STATX_MNT_ID; |
237 |
|
235 if (path.mnt->mnt_root == path.dentry) 236 stat->attributes |= STATX_ATTR_MOUNT_ROOT; 237 stat->attributes_mask |= STATX_ATTR_MOUNT_ROOT; | 238 if (path.mnt->mnt_root == path.dentry) 239 stat->attributes |= STATX_ATTR_MOUNT_ROOT; 240 stat->attributes_mask |= STATX_ATTR_MOUNT_ROOT; |
241 242 /* Handle STATX_DIOALIGN for block devices. */ 243 if (request_mask & STATX_DIOALIGN) { 244 struct inode *inode = d_backing_inode(path.dentry); 245 246 if (S_ISBLK(inode->i_mode)) 247 bdev_statx_dioalign(inode, stat); 248 } 249 |
|
238 path_put(&path); 239 if (retry_estale(error, lookup_flags)) { 240 lookup_flags |= LOOKUP_REVAL; 241 goto retry; 242 } 243out: 244 return error; 245} --- 570 unchanged lines hidden --- | 250 path_put(&path); 251 if (retry_estale(error, lookup_flags)) { 252 lookup_flags |= LOOKUP_REVAL; 253 goto retry; 254 } 255out: 256 return error; 257} --- 570 unchanged lines hidden --- |