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 <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6114
This commit is contained in:
Brian Behlendorf
2017-05-10 09:30:48 -07:00
committed by GitHub
parent a3eeab2de6
commit 2946a1a15a
7 changed files with 45 additions and 11 deletions
+2 -1
View File
@@ -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);