[PATCH] remove ->get_blocks() support
[powerpc.git] / fs / hfs / inode.c
index 3f680c5..2c56470 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 #include <linux/pagemap.h>
-#include <linux/version.h>
 #include <linux/mpage.h>
 
 #include "hfs_fs.h"
@@ -96,21 +95,9 @@ static int hfs_releasepage(struct page *page, gfp_t mask)
                } while (--i && nidx < tree->node_count);
                spin_unlock(&tree->hash_lock);
        }
-       //printk("releasepage: %lu,%x = %d\n", page->index, mask, res);
        return res ? try_to_free_buffers(page) : 0;
 }
 
-static int hfs_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks,
-                         struct buffer_head *bh_result, int create)
-{
-       int ret;
-
-       ret = hfs_get_block(inode, iblock, bh_result, create);
-       if (!ret)
-               bh_result->b_size = (1 << inode->i_blkbits);
-       return ret;
-}
-
 static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb,
                const struct iovec *iov, loff_t offset, unsigned long nr_segs)
 {
@@ -118,7 +105,7 @@ static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb,
        struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
        return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
-                                 offset, nr_segs, hfs_get_blocks, NULL);
+                                 offset, nr_segs, hfs_get_block, NULL);
 }
 
 static int hfs_writepages(struct address_space *mapping,
@@ -548,13 +535,13 @@ static int hfs_file_release(struct inode *inode, struct file *file)
        if (atomic_read(&file->f_count) != 0)
                return 0;
        if (atomic_dec_and_test(&HFS_I(inode)->opencnt)) {
-               down(&inode->i_sem);
+               mutex_lock(&inode->i_mutex);
                hfs_file_truncate(inode);
                //if (inode->i_flags & S_DEAD) {
                //      hfs_delete_cat(inode->i_ino, HFSPLUS_SB(sb).hidden_dir, NULL);
                //      hfs_delete_inode(inode);
                //}
-               up(&inode->i_sem);
+               mutex_unlock(&inode->i_mutex);
        }
        return 0;
 }