aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_linux.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-23 17:15:06 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-23 17:15:06 -0700
commitf11901ed723d1351843771c3a84b03a253bbf8b2 (patch)
tree5db972ca66315d963f0bd73e8e25aeebd8bc7721 /fs/xfs/xfs_linux.h
parentc80e42a4963b3f593d53fb8f565e5bbca61a6531 (diff)
parent2e76f188fd90d9ac29adbb82c30345f84d04bfa4 (diff)
Merge tag 'xfs-5.10-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fixes from Darrick Wong: "Two bug fixes that trickled in during the merge window: - Make fallocate check the alignment of its arguments against the fundamental allocation unit of the volume the file lives on, so that we don't trigger the fs' alignment checks. - Cancel unprocessed log intents immediately when log recovery fails, to avoid a log deadlock" * tag 'xfs-5.10-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: cancel intents immediately if process_intents fails xfs: fix fallocate functions when rtextsize is larger than 1
Diffstat (limited to 'fs/xfs/xfs_linux.h')
-rw-r--r--fs/xfs/xfs_linux.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index ad1009778d33..5b7a1e201559 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -175,6 +175,12 @@ static inline xfs_dev_t linux_to_xfs_dev_t(dev_t dev)
#define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL)
#define xfs_stack_trace() dump_stack()
+static inline uint64_t rounddown_64(uint64_t x, uint32_t y)
+{
+ do_div(x, y);
+ return x * y;
+}
+
static inline uint64_t roundup_64(uint64_t x, uint32_t y)
{
x += y - 1;

Privacy Policy