Re: [PATCH] stat: fix inconsistency between struct stat and struct compat_stat

From: Linus Torvalds
Date: Tue Apr 12 2022 - 19:41:55 EST


On Tue, Apr 12, 2022 at 7:42 AM Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote:
>
> As long as both major and minor numbers are less than 256, these functions
> return equivalent results. So, I think it's safe to replace old_encode_dev
> with new_encode_dev.

You are of course 100% right, and I should have looked more closely at
the code rather than going by my (broken) assumptions based on old
memory of what we did when we did that "new" stat expansion.

I take back all my objections that were completely bogus.

Linus