ocfs2: do not fallback to buffer I/O write if appending
[firefly-linux-kernel-4.4.55.git] / fs / ocfs2 / dir.c
index 319e786175afed345660719cfeb4c245741a2461..b08050bd3f2ef81a2c2f053042ac7e9e763e3718 100644 (file)
@@ -3456,10 +3456,8 @@ static int ocfs2_find_dir_space_el(struct inode *dir, const char *name,
        int blocksize = dir->i_sb->s_blocksize;
 
        status = ocfs2_read_dir_block(dir, 0, &bh, 0);
-       if (status) {
-               mlog_errno(status);
+       if (status)
                goto bail;
-       }
 
        rec_len = OCFS2_DIR_REC_LEN(namelen);
        offset = 0;
@@ -3480,10 +3478,9 @@ static int ocfs2_find_dir_space_el(struct inode *dir, const char *name,
                        status = ocfs2_read_dir_block(dir,
                                             offset >> sb->s_blocksize_bits,
                                             &bh, 0);
-                       if (status) {
-                               mlog_errno(status);
+                       if (status)
                                goto bail;
-                       }
+
                        /* move to next block */
                        de = (struct ocfs2_dir_entry *) bh->b_data;
                }
@@ -3513,7 +3510,6 @@ next:
                de = (struct ocfs2_dir_entry *)((char *) de + le16_to_cpu(de->rec_len));
        }
 
-       status = 0;
 bail:
        brelse(bh);
        if (status)