Whamcloud - gitweb
- minor fixes in smfs to support raw lookups
authoralex <alex>
Tue, 31 May 2005 21:39:59 +0000 (21:39 +0000)
committeralex <alex>
Tue, 31 May 2005 21:39:59 +0000 (21:39 +0000)
lustre/smfs/cache.c
lustre/smfs/dir.c

index e154bb6..ff10281 100644 (file)
@@ -103,6 +103,10 @@ static void setup_iops(struct inode *cache_inode,
                         iops->listxattr = cache_iops->listxattr;
                 if (cache_inode->i_op->removexattr)
                         iops->removexattr = cache_iops->removexattr;
+#if HAVE_LOOKUP_RAW
+                if (cache_inode->i_op->lookup_raw)
+                        iops->lookup_raw = cache_iops->lookup_raw;
+#endif
         }
 }
 
index 3dde19f..4130858 100644 (file)
@@ -307,6 +307,7 @@ static struct dentry *smfs_lookup(struct inode *dir, struct dentry *dentry,
         RETURN(rdentry);
 }
 
+#if HAVE_LOOKUP_RAW
 static int smfs_lookup_raw(struct inode *dir, const char *name,
                            int len, ino_t *data)
 {
@@ -324,6 +325,7 @@ static int smfs_lookup_raw(struct inode *dir, const char *name,
 
         RETURN(rc);
 }
+#endif
 
 static int smfs_link(struct dentry *old_dentry,
                      struct inode *dir, struct dentry *dentry)
@@ -769,7 +771,9 @@ exit:
 struct inode_operations smfs_dir_iops = {
         create:         smfs_create,
         lookup:         smfs_lookup,
+#if HAVE_LOOKUP_RAW
         lookup_raw:     smfs_lookup_raw,
+#endif
         link:           smfs_link,              /* BKL held */
         unlink:         smfs_unlink,            /* BKL held */
         symlink:        smfs_symlink,           /* BKL held */