aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-07 23:50:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-07 23:50:27 -0400
commit149e703cb8bfcbdae46140b108bb6f7d2407df8f (patch)
tree6fdea7cdd4fb54a272cb7dc3c46cb9f2b84059e9
parentd897166d8598e362a31d79dfd9a1e2eedb9ac85c (diff)
parent6ee9706aa22e026f438caabb2982e5f78de2c82c (diff)
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted stuff, with no common topic whatsoever..." * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: libfs: document simple_get_link() Documentation/filesystems/Locking: fix ->get_link() prototype Documentation/filesystems/vfs.txt: document how ->i_link works Documentation/filesystems/vfs.txt: remove bogus "Last updated" date fs: use timespec64 in relatime_need_update fs/block_dev.c: remove unused include
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/vfs.txt8
-rw-r--r--fs/block_dev.c1
-rw-r--r--fs/inode.c4
-rw-r--r--fs/libfs.c14
5 files changed, 23 insertions, 6 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 7b20c385cc02..dac435575384 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -52,7 +52,7 @@ prototypes:
52 int (*rename) (struct inode *, struct dentry *, 52 int (*rename) (struct inode *, struct dentry *,
53 struct inode *, struct dentry *, unsigned int); 53 struct inode *, struct dentry *, unsigned int);
54 int (*readlink) (struct dentry *, char __user *,int); 54 int (*readlink) (struct dentry *, char __user *,int);
55 const char *(*get_link) (struct dentry *, struct inode *, void **); 55 const char *(*get_link) (struct dentry *, struct inode *, struct delayed_call *);
56 void (*truncate) (struct inode *); 56 void (*truncate) (struct inode *);
57 int (*permission) (struct inode *, int, unsigned int); 57 int (*permission) (struct inode *, int, unsigned int);
58 int (*get_acl)(struct inode *, int); 58 int (*get_acl)(struct inode *, int);
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 761c6fd24a53..57fc576b1f3e 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -3,8 +3,6 @@
3 3
4 Original author: Richard Gooch <rgooch@atnf.csiro.au> 4 Original author: Richard Gooch <rgooch@atnf.csiro.au>
5 5
6 Last updated on June 24, 2007.
7
8 Copyright (C) 1999 Richard Gooch 6 Copyright (C) 1999 Richard Gooch
9 Copyright (C) 2005 Pekka Enberg 7 Copyright (C) 2005 Pekka Enberg
10 8
@@ -465,6 +463,12 @@ otherwise noted.
465 argument. If request can't be handled without leaving RCU mode, 463 argument. If request can't be handled without leaving RCU mode,
466 have it return ERR_PTR(-ECHILD). 464 have it return ERR_PTR(-ECHILD).
467 465
466 If the filesystem stores the symlink target in ->i_link, the
467 VFS may use it directly without calling ->get_link(); however,
468 ->get_link() must still be provided. ->i_link must not be
469 freed until after an RCU grace period. Writing to ->i_link
470 post-iget() time requires a 'release' memory barrier.
471
468 readlink: this is now just an override for use by readlink(2) for the 472 readlink: this is now just an override for use by readlink(2) for the
469 cases when ->get_link uses nd_jump_link() or object is not in 473 cases when ->get_link uses nd_jump_link() or object is not in
470 fact a symlink. Normally filesystems should only implement 474 fact a symlink. Normally filesystems should only implement
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 500aaa3e5990..f80045048bb7 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -30,7 +30,6 @@
30#include <linux/log2.h> 30#include <linux/log2.h>
31#include <linux/cleancache.h> 31#include <linux/cleancache.h>
32#include <linux/dax.h> 32#include <linux/dax.h>
33#include <linux/badblocks.h>
34#include <linux/task_io_accounting_ops.h> 33#include <linux/task_io_accounting_ops.h>
35#include <linux/falloc.h> 34#include <linux/falloc.h>
36#include <linux/uaccess.h> 35#include <linux/uaccess.h>
diff --git a/fs/inode.c b/fs/inode.c
index 16b10e53292e..e9d18b2c3f91 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1613,7 +1613,7 @@ EXPORT_SYMBOL(bmap);
1613 * passed since the last atime update. 1613 * passed since the last atime update.
1614 */ 1614 */
1615static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, 1615static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
1616 struct timespec now) 1616 struct timespec64 now)
1617{ 1617{
1618 1618
1619 if (!(mnt->mnt_flags & MNT_RELATIME)) 1619 if (!(mnt->mnt_flags & MNT_RELATIME))
@@ -1714,7 +1714,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode)
1714 1714
1715 now = current_time(inode); 1715 now = current_time(inode);
1716 1716
1717 if (!relatime_need_update(mnt, inode, timespec64_to_timespec(now))) 1717 if (!relatime_need_update(mnt, inode, now))
1718 return false; 1718 return false;
1719 1719
1720 if (timespec64_equal(&inode->i_atime, &now)) 1720 if (timespec64_equal(&inode->i_atime, &now))
diff --git a/fs/libfs.c b/fs/libfs.c
index 9efb647917e0..4b59b1816efb 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1169,6 +1169,20 @@ simple_nosetlease(struct file *filp, long arg, struct file_lock **flp,
1169} 1169}
1170EXPORT_SYMBOL(simple_nosetlease); 1170EXPORT_SYMBOL(simple_nosetlease);
1171 1171
1172/**
1173 * simple_get_link - generic helper to get the target of "fast" symlinks
1174 * @dentry: not used here
1175 * @inode: the symlink inode
1176 * @done: not used here
1177 *
1178 * Generic helper for filesystems to use for symlink inodes where a pointer to
1179 * the symlink target is stored in ->i_link. NOTE: this isn't normally called,
1180 * since as an optimization the path lookup code uses any non-NULL ->i_link
1181 * directly, without calling ->get_link(). But ->get_link() still must be set,
1182 * to mark the inode_operations as being for a symlink.
1183 *
1184 * Return: the symlink target
1185 */
1172const char *simple_get_link(struct dentry *dentry, struct inode *inode, 1186const char *simple_get_link(struct dentry *dentry, struct inode *inode,
1173 struct delayed_call *done) 1187 struct delayed_call *done)
1174{ 1188{