]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext4/migrate.c
ext4: elevate write count for migrate ioctl
[linux-2.6-omap-h63xx.git] / fs / ext4 / migrate.c
index 46fc0b5b12bab540cf00bb1ffb7fcec1b51854fa..f2a9cf498ecda12ddde2c7fb1a73a40c64767ade 100644 (file)
@@ -447,8 +447,7 @@ static int free_ext_block(handle_t *handle, struct inode *inode)
 
 }
 
-int ext4_ext_migrate(struct inode *inode, struct file *filp,
-                               unsigned int cmd, unsigned long arg)
+int ext4_ext_migrate(struct inode *inode)
 {
        handle_t *handle;
        int retval = 0, i;
@@ -515,12 +514,6 @@ int ext4_ext_migrate(struct inode *inode, struct file *filp,
         * trascation that created the inode. Later as and
         * when we add extents we extent the journal
         */
-       /*
-        * inode_mutex prevent write and truncate on the file. Read still goes
-        * through. We take i_data_sem in ext4_ext_swap_inode_data before we
-        * switch the inode format to prevent read.
-        */
-       mutex_lock(&(inode->i_mutex));
        /*
         * Even though we take i_mutex we can still cause block allocation
         * via mmap write to holes. If we have allocated new blocks we fail
@@ -623,7 +616,6 @@ err_out:
        tmp_inode->i_nlink = 0;
 
        ext4_journal_stop(handle);
-       mutex_unlock(&(inode->i_mutex));
 
        if (tmp_inode)
                iput(tmp_inode);