oracleasm/oracleasm-use-timespec64.patch

54 lines
1.7 KiB
Diff

From: "Lee Duncan" <lduncan@suse.com>
Date: Fri 17 Sep 2021 09:43:45 AM PDT
Subject: [PATCH] oracleasm: use timespec64
The timespec struct is now deprecated, so use the
new timespec64.
---
drivers/block/oracleasm/driver.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/block/oracleasm/driver.c
+++ b/drivers/block/oracleasm/driver.c
@@ -910,7 +910,7 @@ static inline void init_timeout(struct t
init_waitqueue_head(&to->wait);
}
-static inline void set_timeout(struct timeout *to, const struct timespec *ts)
+static inline void set_timeout(struct timeout *to, const struct timespec64 *ts)
{
unsigned long how_long;
@@ -1782,10 +1782,10 @@ static inline int asm_complete_ios_thunk
#endif /* BITS_PER_LONG == 64 */
-static int asm_fill_timeout(struct timespec *ts, unsigned long timeout,
+static int asm_fill_timeout(struct timespec64 *ts, unsigned long timeout,
int bpl)
{
- struct timespec __user *ut = (struct timespec __user *)timeout;
+ struct timespec64 __user *ut = (struct timespec64 __user *)timeout;
#if (BITS_PER_LONG == 64) && defined(CONFIG_COMPAT)
struct compat_timespec __user *cut =
@@ -1799,7 +1799,7 @@ static int asm_fill_timeout(struct times
#endif /* BITS_PER_LONG == 64 && defined(CONFIG_COMPAT) */
- return copy_from_user(ts, ut, sizeof(struct timespec));
+ return copy_from_user(ts, ut, sizeof(struct timespec64));
}
static int asm_do_io(struct file *file, struct oracleasm_io_v2 *io,
@@ -1812,7 +1812,7 @@ static int asm_do_io(struct file *file,
init_timeout(&to);
if (io->io_timeout) {
- struct timespec ts;
+ struct timespec64 ts;
ret = -EFAULT;
if (asm_fill_timeout(&ts, (unsigned long)(io->io_timeout),