You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ktime: Get rid of the union
ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless. Get rid of the union and just keep ktime_t as simple typedef of type s64. The conversion was done with coccinelle and some manual mopping up. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
@@ -1285,7 +1285,7 @@ static long read_events(struct kioctx *ctx, long min_nr, long nr,
|
||||
struct io_event __user *event,
|
||||
struct timespec __user *timeout)
|
||||
{
|
||||
ktime_t until = { .tv64 = KTIME_MAX };
|
||||
ktime_t until = KTIME_MAX;
|
||||
long ret = 0;
|
||||
|
||||
if (timeout) {
|
||||
@@ -1311,7 +1311,7 @@ static long read_events(struct kioctx *ctx, long min_nr, long nr,
|
||||
* the ringbuffer empty. So in practice we should be ok, but it's
|
||||
* something to be aware of when touching this code.
|
||||
*/
|
||||
if (until.tv64 == 0)
|
||||
if (until == 0)
|
||||
aio_read_events(ctx, min_nr, nr, event, &ret);
|
||||
else
|
||||
wait_event_interruptible_hrtimeout(ctx->wait,
|
||||
|
||||
Reference in New Issue
Block a user