.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Optimized MPEG FS - inode and super operations. |
---|
3 | 4 | * Copyright (C) 2006 Bob Copeland <me@bobcopeland.com> |
---|
4 | | - * Released under GPL v2. |
---|
5 | 5 | */ |
---|
6 | 6 | #include <linux/module.h> |
---|
7 | 7 | #include <linux/sched.h> |
---|
.. | .. |
---|
20 | 20 | MODULE_AUTHOR("Bob Copeland <me@bobcopeland.com>"); |
---|
21 | 21 | MODULE_DESCRIPTION("OMFS (ReplayTV/Karma) Filesystem for Linux"); |
---|
22 | 22 | MODULE_LICENSE("GPL"); |
---|
| 23 | +MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY); |
---|
23 | 24 | |
---|
24 | 25 | struct buffer_head *omfs_bread(struct super_block *sb, sector_t block) |
---|
25 | 26 | { |
---|
.. | .. |
---|
282 | 283 | buf->f_blocks = sbi->s_num_blocks; |
---|
283 | 284 | buf->f_files = sbi->s_num_blocks; |
---|
284 | 285 | buf->f_namelen = OMFS_NAMELEN; |
---|
285 | | - buf->f_fsid.val[0] = (u32)id; |
---|
286 | | - buf->f_fsid.val[1] = (u32)(id >> 32); |
---|
| 286 | + buf->f_fsid = u64_to_fsid(id); |
---|
287 | 287 | |
---|
288 | 288 | buf->f_bfree = buf->f_bavail = buf->f_ffree = |
---|
289 | 289 | omfs_count_free(s); |
---|
.. | .. |
---|
363 | 363 | bh = sb_bread(sb, block++); |
---|
364 | 364 | if (!bh) |
---|
365 | 365 | goto nomem_free; |
---|
366 | | - *ptr = kmalloc(sb->s_blocksize, GFP_KERNEL); |
---|
| 366 | + *ptr = kmemdup(bh->b_data, sb->s_blocksize, GFP_KERNEL); |
---|
367 | 367 | if (!*ptr) { |
---|
368 | 368 | brelse(bh); |
---|
369 | 369 | goto nomem_free; |
---|
370 | 370 | } |
---|
371 | | - memcpy(*ptr, bh->b_data, sb->s_blocksize); |
---|
372 | 371 | if (count < sb->s_blocksize) |
---|
373 | 372 | memset((void *)*ptr + count, 0xff, |
---|
374 | 373 | sb->s_blocksize - count); |
---|
.. | .. |
---|
478 | 477 | |
---|
479 | 478 | sb->s_maxbytes = 0xffffffff; |
---|
480 | 479 | |
---|
| 480 | + sb->s_time_gran = NSEC_PER_MSEC; |
---|
| 481 | + sb->s_time_min = 0; |
---|
| 482 | + sb->s_time_max = U64_MAX / MSEC_PER_SEC; |
---|
| 483 | + |
---|
481 | 484 | sb_set_blocksize(sb, 0x200); |
---|
482 | 485 | |
---|
483 | 486 | bh = sb_bread(sb, 0); |
---|