]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/reiserfs/dir.c
Merge git://git.infradead.org/hdrinstall-2.6
[linux-2.6-omap-h63xx.git] / fs / reiserfs / dir.c
index 9dd71e8070349c20f73102aad0d73de003cb7628..9aabcc0ccd2d002401e7611a93f5f6b8458136c0 100644 (file)
@@ -2,7 +2,6 @@
  * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
  */
 
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
@@ -18,7 +17,7 @@ static int reiserfs_readdir(struct file *, void *, filldir_t);
 static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry,
                              int datasync);
 
-struct file_operations reiserfs_dir_operations = {
+const struct file_operations reiserfs_dir_operations = {
        .read = generic_read_dir,
        .readdir = reiserfs_readdir,
        .fsync = reiserfs_dir_fsync,
@@ -150,18 +149,15 @@ static int reiserfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
                                if (d_reclen <= 32) {
                                        local_buf = small_buf;
                                } else {
-                                       local_buf =
-                                           reiserfs_kmalloc(d_reclen, GFP_NOFS,
-                                                            inode->i_sb);
+                                       local_buf = kmalloc(d_reclen,
+                                                           GFP_NOFS);
                                        if (!local_buf) {
                                                pathrelse(&path_to_entry);
                                                ret = -ENOMEM;
                                                goto out;
                                        }
                                        if (item_moved(&tmp_ih, &path_to_entry)) {
-                                               reiserfs_kfree(local_buf,
-                                                              d_reclen,
-                                                              inode->i_sb);
+                                               kfree(local_buf);
                                                goto research;
                                        }
                                }
@@ -174,15 +170,12 @@ static int reiserfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
                                    (dirent, local_buf, d_reclen, d_off, d_ino,
                                     DT_UNKNOWN) < 0) {
                                        if (local_buf != small_buf) {
-                                               reiserfs_kfree(local_buf,
-                                                              d_reclen,
-                                                              inode->i_sb);
+                                               kfree(local_buf);
                                        }
                                        goto end;
                                }
                                if (local_buf != small_buf) {
-                                       reiserfs_kfree(local_buf, d_reclen,
-                                                      inode->i_sb);
+                                       kfree(local_buf);
                                }
                                // next entry should be looked for with such offset
                                next_pos = deh_offset(deh) + 1;