diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-08 05:50:27 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-08 05:50:27 +0200 |
commit | 149e703cb8bfcbdae46140b108bb6f7d2407df8f (patch) | |
tree | 6fdea7cdd4fb54a272cb7dc3c46cb9f2b84059e9 /fs | |
parent | Merge branch 'work.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vir... (diff) | |
parent | libfs: document simple_get_link() (diff) | |
download | linux-149e703cb8bfcbdae46140b108bb6f7d2407df8f.tar.xz linux-149e703cb8bfcbdae46140b108bb6f7d2407df8f.zip |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/block_dev.c | 1 | ||||
-rw-r--r-- | fs/inode.c | 4 | ||||
-rw-r--r-- | fs/libfs.c | 14 |
3 files changed, 16 insertions, 3 deletions
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 @@ #include <linux/log2.h> #include <linux/cleancache.h> #include <linux/dax.h> -#include <linux/badblocks.h> #include <linux/task_io_accounting_ops.h> #include <linux/falloc.h> #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); * passed since the last atime update. */ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, - struct timespec now) + struct timespec64 now) { if (!(mnt->mnt_flags & MNT_RELATIME)) @@ -1714,7 +1714,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode) now = current_time(inode); - if (!relatime_need_update(mnt, inode, timespec64_to_timespec(now))) + if (!relatime_need_update(mnt, inode, now)) return false; 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, } EXPORT_SYMBOL(simple_nosetlease); +/** + * simple_get_link - generic helper to get the target of "fast" symlinks + * @dentry: not used here + * @inode: the symlink inode + * @done: not used here + * + * Generic helper for filesystems to use for symlink inodes where a pointer to + * the symlink target is stored in ->i_link. NOTE: this isn't normally called, + * since as an optimization the path lookup code uses any non-NULL ->i_link + * directly, without calling ->get_link(). But ->get_link() still must be set, + * to mark the inode_operations as being for a symlink. + * + * Return: the symlink target + */ const char *simple_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) { |