summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_ctldir.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-05-10 09:30:48 -0700
committerGitHub <[email protected]>2017-05-10 09:30:48 -0700
commit2946a1a15aab874107b4425513c1bf805e730803 (patch)
tree21b3f8b56ed293b626eefc6549aeb74342ae3eb5 /module/zfs/zfs_ctldir.c
parenta3eeab2de68670a4481eab3d086982aff23b6906 (diff)
Linux 4.12 compat: CURRENT_TIME removed
Linux 4.9 added current_time() as the preferred interface to get the filesystem time. CURRENT_TIME was retired in Linux 4.12. Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6114
Diffstat (limited to 'module/zfs/zfs_ctldir.c')
-rw-r--r--module/zfs/zfs_ctldir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
index eea1bb2e8..0c90532c1 100644
--- a/module/zfs/zfs_ctldir.c
+++ b/module/zfs/zfs_ctldir.c
@@ -451,7 +451,7 @@ static struct inode *
zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id,
const struct file_operations *fops, const struct inode_operations *ops)
{
- struct timespec now = current_fs_time(zfsvfs->z_sb);
+ struct timespec now;
struct inode *ip;
znode_t *zp;
@@ -459,6 +459,7 @@ zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id,
if (ip == NULL)
return (NULL);
+ now = current_time(ip);
zp = ITOZ(ip);
ASSERT3P(zp->z_dirlocks, ==, NULL);
ASSERT3P(zp->z_acl_cached, ==, NULL);