]> err.no Git - linux-2.6/blobdiff - fs/ext4/namei.c
[PATCH] Take i_mutex in splice_from_pipe()
[linux-2.6] / fs / ext4 / namei.c
index 956b38113f62a6fe04ef4c38febe42df708d378e..8b1bd03d20f5d6dee84a89001d653810ef3e6706 100644 (file)
 
 #include <linux/fs.h>
 #include <linux/pagemap.h>
-#include <linux/jbd.h>
+#include <linux/jbd2.h>
 #include <linux/time.h>
 #include <linux/ext4_fs.h>
-#include <linux/ext4_jbd.h>
+#include <linux/ext4_jbd2.h>
 #include <linux/fcntl.h>
 #include <linux/stat.h>
 #include <linux/string.h>
@@ -241,13 +241,13 @@ static inline unsigned dx_node_limit (struct inode *dir)
 #ifdef DX_DEBUG
 static void dx_show_index (char * label, struct dx_entry *entries)
 {
-        int i, n = dx_get_count (entries);
+       int i, n = dx_get_count (entries);
         printk("%s index ", label);
-        for (i = 0; i < n; i++)
-        {
-                printk("%x->%u ", i? dx_get_hash(entries + i): 0, dx_get_block(entries + i));
-        }
-        printk("\n");
+       for (i = 0; i < n; i++) {
+               printk("%x->%u ", i? dx_get_hash(entries + i) :
+                               0, dx_get_block(entries + i));
+       }
+       printk("\n");
 }
 
 struct stats
@@ -688,28 +688,26 @@ static int dx_make_map (struct ext4_dir_entry_2 *de, int size,
 
 static void dx_sort_map (struct dx_map_entry *map, unsigned count)
 {
-        struct dx_map_entry *p, *q, *top = map + count - 1;
-        int more;
-        /* Combsort until bubble sort doesn't suck */
-        while (count > 2)
-       {
-                count = count*10/13;
-                if (count - 9 < 2) /* 9, 10 -> 11 */
-                        count = 11;
-                for (p = top, q = p - count; q >= map; p--, q--)
-                        if (p->hash < q->hash)
-                                swap(*p, *q);
-        }
-        /* Garden variety bubble sort */
-        do {
-                more = 0;
-                q = top;
-                while (q-- > map)
-               {
-                        if (q[1].hash >= q[0].hash)
+       struct dx_map_entry *p, *q, *top = map + count - 1;
+       int more;
+       /* Combsort until bubble sort doesn't suck */
+       while (count > 2) {
+               count = count*10/13;
+               if (count - 9 < 2) /* 9, 10 -> 11 */
+                       count = 11;
+               for (p = top, q = p - count; q >= map; p--, q--)
+                       if (p->hash < q->hash)
+                               swap(*p, *q);
+       }
+       /* Garden variety bubble sort */
+       do {
+               more = 0;
+               q = top;
+               while (q-- > map) {
+                       if (q[1].hash >= q[0].hash)
                                continue;
-                        swap(*(q+1), *q);
-                        more = 1;
+                       swap(*(q+1), *q);
+                       more = 1;
                }
        } while(more);
 }