]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ext3/namei.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[karo-tx-linux.git] / fs / ext3 / namei.c
index 642dc6d66dfd0a4272c3b8c983d3155428fb821a..e8e211795e9f3cf13a34c12e1376efcde034fa54 100644 (file)
@@ -921,9 +921,12 @@ restart:
                                num++;
                                bh = ext3_getblk(NULL, dir, b++, 0, &err);
                                bh_use[ra_max] = bh;
-                               if (bh)
-                                       ll_rw_block(READ | REQ_META | REQ_PRIO,
-                                                   1, &bh);
+                               if (bh && !bh_uptodate_or_lock(bh)) {
+                                       get_bh(bh);
+                                       bh->b_end_io = end_buffer_read_sync;
+                                       submit_bh(READ | REQ_META | REQ_PRIO,
+                                                 bh);
+                               }
                        }
                }
                if ((bh = bh_use[ra_ptr++]) == NULL)
@@ -1698,7 +1701,7 @@ static int ext3_add_nondir(handle_t *handle,
  * If the create succeeds, we fill in the inode information
  * with d_instantiate().
  */
-static int ext3_create (struct inode * dir, struct dentry * dentry, int mode,
+static int ext3_create (struct inode * dir, struct dentry * dentry, umode_t mode,
                struct nameidata *nd)
 {
        handle_t *handle;
@@ -1732,7 +1735,7 @@ retry:
 }
 
 static int ext3_mknod (struct inode * dir, struct dentry *dentry,
-                       int mode, dev_t rdev)
+                       umode_t mode, dev_t rdev)
 {
        handle_t *handle;
        struct inode *inode;
@@ -1768,7 +1771,7 @@ retry:
        return err;
 }
 
-static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode)
+static int ext3_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
 {
        handle_t *handle;
        struct inode * inode;
@@ -2272,7 +2275,7 @@ retry:
                        err = PTR_ERR(handle);
                        goto err_drop_inode;
                }
-               inc_nlink(inode);
+               set_nlink(inode, 1);
                err = ext3_orphan_del(handle, inode);
                if (err) {
                        ext3_journal_stop(handle);