printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
               str, err, ++die_counter);
-       sysfs_printk_last_file();
 
        /* trap and error numbers are mostly meaningless on ARM */
        ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV);
 
 #endif
                printk("%s\n", ppc_md.name ? ppc_md.name : "");
 
-               sysfs_printk_last_file();
                if (notify_die(DIE_OOPS, str, regs, err, 255,
                               SIGSEGV) == NOTIFY_STOP)
                        return 1;
 
        bust_spinlocks(1);
 
        printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
-       sysfs_printk_last_file();
        print_modules();
        show_regs(regs);
 
 
 
        printk(KERN_EMERG "Internal error: %s: %x [#%d]\n",
               str, err, ++die_counter);
-       sysfs_printk_last_file();
 
        /* trap and error numbers are mostly meaningless on UniCore */
        ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, \
 
        printk("DEBUG_PAGEALLOC");
 #endif
        printk("\n");
-       sysfs_printk_last_file();
        if (notify_die(DIE_OOPS, str, regs, err,
                        current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
                return 1;
 
 
 #include "sysfs.h"
 
-/* used in crash dumps to help with debugging */
-static char last_sysfs_file[PATH_MAX];
-void sysfs_printk_last_file(void)
-{
-       printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file);
-}
-
 /*
  * There's one sysfs_buffer for each open file and one
  * sysfs_open_dirent for each sysfs_dirent with one or more open
        struct sysfs_buffer *buffer;
        const struct sysfs_ops *ops;
        int error = -EACCES;
-       char *p;
-
-       p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file));
-       if (!IS_ERR(p))
-               memmove(last_sysfs_file, p, strlen(p) + 1);
 
        /* need attr_sd for attr and ops, its parent for kobj */
        if (!sysfs_get_active(attr_sd))
 
                                      const unsigned char *name);
 struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd);
 void sysfs_put(struct sysfs_dirent *sd);
-void sysfs_printk_last_file(void);
 
 /* Called to clear a ns tag when it is no longer valid */
 void sysfs_exit_ns(enum kobj_ns_type type, const void *tag);
        return 0;
 }
 
-static inline void sysfs_printk_last_file(void)
-{
-}
-
 #endif /* CONFIG_SYSFS */
 
 #endif /* _SYSFS_H_ */