aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-03 14:38:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-03 14:38:56 -0500
commit590dce2d4934fb909b112cd80c80486362337744 (patch)
tree9c46dfa627c0adb639ee1542fffbc2262727ef36 /fs/gfs2/inode.c
parente0d072250a54669dce876d8ade70e417356aae74 (diff)
parenta528d35e8bfcc521d7cb70aaf03e1bd296c8493f (diff)
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/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 9d28f55fbd1d..e279c3ce27be 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1960,9 +1960,10 @@ out:
1960 1960
1961/** 1961/**
1962 * gfs2_getattr - Read out an inode's attributes 1962 * gfs2_getattr - Read out an inode's attributes
1963 * @mnt: The vfsmount the inode is being accessed from 1963 * @path: Object to query
1964 * @dentry: The dentry to stat
1965 * @stat: The inode's stats 1964 * @stat: The inode's stats
1965 * @request_mask: Mask of STATX_xxx flags indicating the caller's interests
1966 * @flags: AT_STATX_xxx setting
1966 * 1967 *
1967 * This may be called from the VFS directly, or from within GFS2 with the 1968 * This may be called from the VFS directly, or from within GFS2 with the
1968 * inode locked, so we look to see if the glock is already locked and only 1969 * inode locked, so we look to see if the glock is already locked and only
@@ -1973,10 +1974,10 @@ out:
1973 * Returns: errno 1974 * Returns: errno
1974 */ 1975 */
1975 1976
1976static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, 1977static int gfs2_getattr(const struct path *path, struct kstat *stat,
1977 struct kstat *stat) 1978 u32 request_mask, unsigned int flags)
1978{ 1979{
1979 struct inode *inode = d_inode(dentry); 1980 struct inode *inode = d_inode(path->dentry);
1980 struct gfs2_inode *ip = GFS2_I(inode); 1981 struct gfs2_inode *ip = GFS2_I(inode);
1981 struct gfs2_holder gh; 1982 struct gfs2_holder gh;
1982 int error; 1983 int error;