aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/file.c2
-rw-r--r--fs/ocfs2/super.c2
-rw-r--r--fs/ocfs2/super.h2
3 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 992eb567cb4d..7e508e2942ca 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1533,7 +1533,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
1533 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 1533 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
1534 struct buffer_head *di_bh = NULL; 1534 struct buffer_head *di_bh = NULL;
1535 handle_t *handle; 1535 handle_t *handle;
1536 unsigned long long max_off = ocfs2_max_file_offset(inode->i_sb->s_blocksize_bits); 1536 unsigned long long max_off = inode->i_sb->s_maxbytes;
1537 1537
1538 if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) 1538 if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb))
1539 return -EROFS; 1539 return -EROFS;
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 200c7d4790dc..a100b488533e 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -319,7 +319,7 @@ static void ocfs2_destroy_inode(struct inode *inode)
319/* From xfs_super.c:xfs_max_file_offset 319/* From xfs_super.c:xfs_max_file_offset
320 * Copyright (c) 2000-2004 Silicon Graphics, Inc. 320 * Copyright (c) 2000-2004 Silicon Graphics, Inc.
321 */ 321 */
322unsigned long long ocfs2_max_file_offset(unsigned int blockshift) 322static unsigned long long ocfs2_max_file_offset(unsigned int blockshift)
323{ 323{
324 unsigned int pagefactor = 1; 324 unsigned int pagefactor = 1;
325 unsigned int bitshift = BITS_PER_LONG - 1; 325 unsigned int bitshift = BITS_PER_LONG - 1;
diff --git a/fs/ocfs2/super.h b/fs/ocfs2/super.h
index 3b9cb3d0b008..783f5270f2a1 100644
--- a/fs/ocfs2/super.h
+++ b/fs/ocfs2/super.h
@@ -45,6 +45,4 @@ void __ocfs2_abort(struct super_block *sb,
45 45
46#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args) 46#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
47 47
48unsigned long long ocfs2_max_file_offset(unsigned int blockshift);
49
50#endif /* OCFS2_SUPER_H */ 48#endif /* OCFS2_SUPER_H */