diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
commit | 57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch) | |
tree | b5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /fs/coda/coda_linux.c | |
parent | 0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff) | |
parent | 43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
"VM:
- z3fold fixes and enhancements by Henry Burns and Vitaly Wool
- more accurate reclaimed slab caches calculations by Yafang Shao
- fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
Christoph Hellwig
- !CONFIG_MMU fixes by Christoph Hellwig
- new novmcoredd parameter to omit device dumps from vmcore, by
Kairui Song
- new test_meminit module for testing heap and pagealloc
initialization, by Alexander Potapenko
- ioremap improvements for huge mappings, by Anshuman Khandual
- generalize kprobe page fault handling, by Anshuman Khandual
- device-dax hotplug fixes and improvements, by Pavel Tatashin
- enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
- add pte_devmap() support for arm64, by Robin Murphy
- unify locked_vm accounting with a helper, by Daniel Jordan
- several misc fixes
core/lib:
- new typeof_member() macro including some users, by Alexey Dobriyan
- make BIT() and GENMASK() available in asm, by Masahiro Yamada
- changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
code generation, by Alexey Dobriyan
- rbtree code size optimizations, by Michel Lespinasse
- convert struct pid count to refcount_t, by Joel Fernandes
get_maintainer.pl:
- add --no-moderated switch to skip moderated ML's, by Joe Perches
misc:
- ptrace PTRACE_GET_SYSCALL_INFO interface
- coda updates
- gdb scripts, various"
[ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
fs/select.c: use struct_size() in kmalloc()
mm: add account_locked_vm utility function
arm64: mm: implement pte_devmap support
mm: introduce ARCH_HAS_PTE_DEVMAP
mm: clean up is_device_*_page() definitions
mm/mmap: move common defines to mman-common.h
mm: move MAP_SYNC to asm-generic/mman-common.h
device-dax: "Hotremove" persistent memory that is used like normal RAM
mm/hotplug: make remove_memory() interface usable
device-dax: fix memory and resource leak if hotplug fails
include/linux/lz4.h: fix spelling and copy-paste errors in documentation
ipc/mqueue.c: only perform resource calculation if user valid
include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
scripts/gdb: add helpers to find and list devices
scripts/gdb: add lx-genpd-summary command
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
kernel/pid.c: convert struct pid count to refcount_t
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
...
Diffstat (limited to 'fs/coda/coda_linux.c')
-rw-r--r-- | fs/coda/coda_linux.c | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/fs/coda/coda_linux.c b/fs/coda/coda_linux.c index f3d543dd9a98..2e1a5a192074 100644 --- a/fs/coda/coda_linux.c +++ b/fs/coda/coda_linux.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | 19 | ||
20 | #include <linux/coda.h> | 20 | #include <linux/coda.h> |
21 | #include <linux/coda_psdev.h> | 21 | #include "coda_psdev.h" |
22 | #include "coda_linux.h" | 22 | #include "coda_linux.h" |
23 | 23 | ||
24 | /* initialize the debugging variables */ | 24 | /* initialize the debugging variables */ |
@@ -66,6 +66,25 @@ unsigned short coda_flags_to_cflags(unsigned short flags) | |||
66 | return coda_flags; | 66 | return coda_flags; |
67 | } | 67 | } |
68 | 68 | ||
69 | static struct timespec64 coda_to_timespec64(struct coda_timespec ts) | ||
70 | { | ||
71 | struct timespec64 ts64 = { | ||
72 | .tv_sec = ts.tv_sec, | ||
73 | .tv_nsec = ts.tv_nsec, | ||
74 | }; | ||
75 | |||
76 | return ts64; | ||
77 | } | ||
78 | |||
79 | static struct coda_timespec timespec64_to_coda(struct timespec64 ts64) | ||
80 | { | ||
81 | struct coda_timespec ts = { | ||
82 | .tv_sec = ts64.tv_sec, | ||
83 | .tv_nsec = ts64.tv_nsec, | ||
84 | }; | ||
85 | |||
86 | return ts; | ||
87 | } | ||
69 | 88 | ||
70 | /* utility functions below */ | 89 | /* utility functions below */ |
71 | void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr) | 90 | void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr) |
@@ -105,11 +124,11 @@ void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr) | |||
105 | if (attr->va_size != -1) | 124 | if (attr->va_size != -1) |
106 | inode->i_blocks = (attr->va_size + 511) >> 9; | 125 | inode->i_blocks = (attr->va_size + 511) >> 9; |
107 | if (attr->va_atime.tv_sec != -1) | 126 | if (attr->va_atime.tv_sec != -1) |
108 | inode->i_atime = timespec_to_timespec64(attr->va_atime); | 127 | inode->i_atime = coda_to_timespec64(attr->va_atime); |
109 | if (attr->va_mtime.tv_sec != -1) | 128 | if (attr->va_mtime.tv_sec != -1) |
110 | inode->i_mtime = timespec_to_timespec64(attr->va_mtime); | 129 | inode->i_mtime = coda_to_timespec64(attr->va_mtime); |
111 | if (attr->va_ctime.tv_sec != -1) | 130 | if (attr->va_ctime.tv_sec != -1) |
112 | inode->i_ctime = timespec_to_timespec64(attr->va_ctime); | 131 | inode->i_ctime = coda_to_timespec64(attr->va_ctime); |
113 | } | 132 | } |
114 | 133 | ||
115 | 134 | ||
@@ -130,12 +149,12 @@ void coda_iattr_to_vattr(struct iattr *iattr, struct coda_vattr *vattr) | |||
130 | vattr->va_uid = (vuid_t) -1; | 149 | vattr->va_uid = (vuid_t) -1; |
131 | vattr->va_gid = (vgid_t) -1; | 150 | vattr->va_gid = (vgid_t) -1; |
132 | vattr->va_size = (off_t) -1; | 151 | vattr->va_size = (off_t) -1; |
133 | vattr->va_atime.tv_sec = (time_t) -1; | 152 | vattr->va_atime.tv_sec = (int64_t) -1; |
134 | vattr->va_atime.tv_nsec = (time_t) -1; | 153 | vattr->va_atime.tv_nsec = (long) -1; |
135 | vattr->va_mtime.tv_sec = (time_t) -1; | 154 | vattr->va_mtime.tv_sec = (int64_t) -1; |
136 | vattr->va_mtime.tv_nsec = (time_t) -1; | 155 | vattr->va_mtime.tv_nsec = (long) -1; |
137 | vattr->va_ctime.tv_sec = (time_t) -1; | 156 | vattr->va_ctime.tv_sec = (int64_t) -1; |
138 | vattr->va_ctime.tv_nsec = (time_t) -1; | 157 | vattr->va_ctime.tv_nsec = (long) -1; |
139 | vattr->va_type = C_VNON; | 158 | vattr->va_type = C_VNON; |
140 | vattr->va_fileid = -1; | 159 | vattr->va_fileid = -1; |
141 | vattr->va_gen = -1; | 160 | vattr->va_gen = -1; |
@@ -175,13 +194,13 @@ void coda_iattr_to_vattr(struct iattr *iattr, struct coda_vattr *vattr) | |||
175 | vattr->va_size = iattr->ia_size; | 194 | vattr->va_size = iattr->ia_size; |
176 | } | 195 | } |
177 | if ( valid & ATTR_ATIME ) { | 196 | if ( valid & ATTR_ATIME ) { |
178 | vattr->va_atime = timespec64_to_timespec(iattr->ia_atime); | 197 | vattr->va_atime = timespec64_to_coda(iattr->ia_atime); |
179 | } | 198 | } |
180 | if ( valid & ATTR_MTIME ) { | 199 | if ( valid & ATTR_MTIME ) { |
181 | vattr->va_mtime = timespec64_to_timespec(iattr->ia_mtime); | 200 | vattr->va_mtime = timespec64_to_coda(iattr->ia_mtime); |
182 | } | 201 | } |
183 | if ( valid & ATTR_CTIME ) { | 202 | if ( valid & ATTR_CTIME ) { |
184 | vattr->va_ctime = timespec64_to_timespec(iattr->ia_ctime); | 203 | vattr->va_ctime = timespec64_to_coda(iattr->ia_ctime); |
185 | } | 204 | } |
186 | } | 205 | } |
187 | 206 | ||