diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-11-24 01:05:15 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-11-25 12:07:42 +0300 |
| commit | 37d369fa97cc0774ea4eab726d16bcb5fbe3a104 (patch) | |
| tree | 6b5548ec93f0b63d897e3fbcc7f6d3b1a418f54c /include/linux/types.h | |
| parent | a77a59592febd4179efa6b59f2ef5bdfe9a5b895 (diff) | |
| download | linux-37d369fa97cc0774ea4eab726d16bcb5fbe3a104.tar.xz | |
fs: Add uoff_t
In a recent commit, I inadvertently changed a comparison from being an
unsigned comparison (on 64-bit systems) to being a signed comparison
(which it had always been on 32-bit systems). This led to a sporadic
fstests failure.
To make sure this comparison is always unsigned, introduce a new type,
uoff_t which is the unsigned version of loff_t. Generally file sizes
are restricted to being a signed integer, but in these two places it is
convenient to pass -1 to indicate "up to the end of the file".
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://patch.msgid.link/20251123220518.1447261-1-willy@infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/types.h')
| -rw-r--r-- | include/linux/types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/types.h b/include/linux/types.h index 6dfdb8e8e4c3..d4437e9c452c 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -50,6 +50,7 @@ typedef __kernel_old_gid_t old_gid_t; #if defined(__GNUC__) typedef __kernel_loff_t loff_t; +typedef __kernel_uoff_t uoff_t; #endif /* |
