Skip to content

Commit

Permalink
mount: Remove warning for impending timestamp expiry
Browse files Browse the repository at this point in the history
Take out this, this hmm, well say 'officious' warning about timestamp expiry in 2038.
A nicer approach would be to make it configurable via kernel_config

Basically this reverts http://lkml.iu.edu/hypermail/linux/kernel/1908.2/01441.html
  • Loading branch information
thomas authored and donald committed Feb 25, 2022
1 parent 6793a66 commit 82d1bbe
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2592,27 +2592,6 @@ static void set_mount_attributes(struct mount *mnt, unsigned int mnt_flags)
touch_mnt_namespace(mnt->mnt_ns);
}

static void mnt_warn_timestamp_expiry(struct path *mountpoint, struct vfsmount *mnt)
{
struct super_block *sb = mnt->mnt_sb;

if (!__mnt_is_readonly(mnt) &&
(ktime_get_real_seconds() + TIME_UPTIME_SEC_MAX > sb->s_time_max)) {
char *buf = (char *)__get_free_page(GFP_KERNEL);
char *mntpath = buf ? d_path(mountpoint, buf, PAGE_SIZE) : ERR_PTR(-ENOMEM);
struct tm tm;

time64_to_tm(sb->s_time_max, 0, &tm);

pr_warn("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n",
sb->s_type->name,
is_mounted(mnt) ? "remounted" : "mounted",
mntpath,
tm.tm_year+1900, (unsigned long long)sb->s_time_max);

free_page((unsigned long)buf);
}
}

/*
* Handle reconfiguration of the mountpoint only without alteration of the
Expand Down Expand Up @@ -2646,8 +2625,6 @@ static int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags)
unlock_mount_hash();
up_read(&sb->s_umount);

mnt_warn_timestamp_expiry(path, &mnt->mnt);

return ret;
}

Expand Down Expand Up @@ -2693,8 +2670,6 @@ static int do_remount(struct path *path, int ms_flags, int sb_flags,
up_write(&sb->s_umount);
}

mnt_warn_timestamp_expiry(path, &mnt->mnt);

put_fs_context(fc);
return err;
}
Expand Down Expand Up @@ -2962,8 +2937,6 @@ static int do_new_mount_fc(struct fs_context *fc, struct path *mountpoint,
if (IS_ERR(mnt))
return PTR_ERR(mnt);

mnt_warn_timestamp_expiry(mountpoint, mnt);

mp = lock_mount(mountpoint);
if (IS_ERR(mp)) {
mntput(mnt);
Expand Down

0 comments on commit 82d1bbe

Please sign in to comment.