Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a00cce356b5592208e761525a48a25902322cce9
Commit:     a00cce356b5592208e761525a48a25902322cce9
Parent:     c11e9fafb398411af7558fca913c2fa4a10b1f48
Author:     Mark Fasheh <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 11:28:30 2007 -0700
Committer:  Mark Fasheh <[EMAIL PROTECTED]>
CommitDate: Thu Aug 9 17:25:07 2007 -0700

    ocfs2: use s_maxbytes directly in ocfs2_change_file_space()
    
    There's no need to recalculate things via ocfs2_max_file_offset() as we've
    already done that to fill s_maxbytes, so use that instead. We can also
    un-export ocfs2_max_file_offset() then.
    
    Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]>
---
 fs/ocfs2/file.c  |    2 +-
 fs/ocfs2/super.c |    2 +-
 fs/ocfs2/super.h |    2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 992eb56..7e508e2 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,
        struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
        struct buffer_head *di_bh = NULL;
        handle_t *handle;
-       unsigned long long max_off = 
ocfs2_max_file_offset(inode->i_sb->s_blocksize_bits);
+       unsigned long long max_off = inode->i_sb->s_maxbytes;
 
        if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb))
                return -EROFS;
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 200c7d4..a100b48 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -319,7 +319,7 @@ static void ocfs2_destroy_inode(struct inode *inode)
 /* From xfs_super.c:xfs_max_file_offset
  * Copyright (c) 2000-2004 Silicon Graphics, Inc.
  */
-unsigned long long ocfs2_max_file_offset(unsigned int blockshift)
+static unsigned long long ocfs2_max_file_offset(unsigned int blockshift)
 {
        unsigned int pagefactor = 1;
        unsigned int bitshift = BITS_PER_LONG - 1;
diff --git a/fs/ocfs2/super.h b/fs/ocfs2/super.h
index 3b9cb3d..783f527 100644
--- a/fs/ocfs2/super.h
+++ b/fs/ocfs2/super.h
@@ -45,6 +45,4 @@ void __ocfs2_abort(struct super_block *sb,
 
 #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, 
fmt, ##args)
 
-unsigned long long ocfs2_max_file_offset(unsigned int blockshift);
-
 #endif /* OCFS2_SUPER_H */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to