patch-2.3.99-pre4 linux/include/asm-sparc64/namei.h

Next file: linux/include/asm-sparc64/pbm.h
Previous file: linux/include/asm-sparc64/io.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/include/asm-sparc64/namei.h linux/include/asm-sparc64/namei.h
@@ -11,53 +11,16 @@
 #define SPARC_BSD_EMUL "usr/gnemul/sunos/"
 #define SPARC_SOL_EMUL "usr/gnemul/solaris/"
 
-static inline struct dentry *
-__sparc64_lookup_dentry(const char *name, int lookup_flags)
+static inline char * __emul_prefix(void)
 {
-	struct dentry *base;
-	char *emul;
-
 	switch (current->personality) {
 	case PER_BSD:
-		emul = SPARC_BSD_EMUL; break;
+		return SPARC_BSD_EMUL;
 	case PER_SVR4:
-		emul = SPARC_SOL_EMUL; break;
+		return SPARC_SOL_EMUL;
 	default:
 		return NULL;
 	}
-
-	base = lookup_dentry (emul, 
-			      dget (current->fs->root), 
-			      (LOOKUP_FOLLOW | LOOKUP_DIRECTORY));
-			
-	if (IS_ERR (base)) return NULL;
-	
-	base = lookup_dentry (name, base, lookup_flags);
-	
-	if (IS_ERR (base)) return NULL;
-	
-	if (!base->d_inode) {
-		struct dentry *fromroot;
-		
-		fromroot = lookup_dentry (name, dget (current->fs->root), lookup_flags);
-		
-		if (IS_ERR (fromroot)) return base;
-		
-		if (fromroot->d_inode) {
-			dput(base);
-			return fromroot;
-		}
-		
-		dput(fromroot);
-	}
-	
-	return base;
 }
-
-#define __prefix_lookup_dentry(name, lookup_flags)				\
-	if (current->personality) {						\
-		dentry = __sparc64_lookup_dentry (name, lookup_flags);		\
-		if (dentry) return dentry;					\
-	}
 
 #endif /* __SPARC64_NAMEI_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)