]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ext4/namei.c
ext4: Add auto_da_alloc mount option
[net-next-2.6.git] / fs / ext4 / namei.c
index eb20246c89654758f078867ad929b1a5c590b495..22098e1cd085911a7aeffc975ac7a0773a32bbc0 100644 (file)
@@ -2497,7 +2497,8 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
                ext4_mark_inode_dirty(handle, new_inode);
                if (!new_inode->i_nlink)
                        ext4_orphan_add(handle, new_inode);
-               force_da_alloc = 1;
+               if (!test_opt(new_dir->i_sb, NO_AUTO_DA_ALLOC))
+                       force_da_alloc = 1;
        }
        retval = 0;