diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-03 11:38:56 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-03 11:38:56 -0800 |
commit | 590dce2d4934fb909b112cd80c80486362337744 (patch) | |
tree | 9c46dfa627c0adb639ee1542fffbc2262727ef36 /fs/proc/base.c | |
parent | e0d072250a54669dce876d8ade70e417356aae74 (diff) | |
parent | a528d35e8bfcc521d7cb70aaf03e1bd296c8493f (diff) | |
download | op-kernel-dev-590dce2d4934fb909b112cd80c80486362337744.zip op-kernel-dev-590dce2d4934fb909b112cd80c80486362337744.tar.gz |
Merge branch 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs 'statx()' update from Al Viro.
This adds the new extended stat() interface that internally subsumes our
previous stat interfaces, and allows user mode to specify in more detail
what kind of information it wants.
It also allows for some explicit synchronization information to be
passed to the filesystem, which can be relevant for network filesystems:
is the cached value ok, or do you need open/close consistency, or what?
From David Howells.
Andreas Dilger points out that the first version of the extended statx
interface was posted June 29, 2010:
https://www.spinics.net/lists/linux-fsdevel/msg33831.html
* 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
statx: Add a system call to make enhanced file info available
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 2dae600..c87b6b9 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1729,11 +1729,12 @@ out_unlock: return NULL; } -int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) +int pid_getattr(const struct path *path, struct kstat *stat, + u32 request_mask, unsigned int query_flags) { - struct inode *inode = d_inode(dentry); + struct inode *inode = d_inode(path->dentry); struct task_struct *task; - struct pid_namespace *pid = dentry->d_sb->s_fs_info; + struct pid_namespace *pid = path->dentry->d_sb->s_fs_info; generic_fillattr(inode, stat); @@ -3516,9 +3517,10 @@ static int proc_task_readdir(struct file *file, struct dir_context *ctx) return 0; } -static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) +static int proc_task_getattr(const struct path *path, struct kstat *stat, + u32 request_mask, unsigned int query_flags) { - struct inode *inode = d_inode(dentry); + struct inode *inode = d_inode(path->dentry); struct task_struct *p = get_proc_task(inode); generic_fillattr(inode, stat); |