android_kernel_xiaomi_sm8350/lib
Eric W. Biederman b592fcfe7f sysfs: Shadow directory support
The problem.  When implementing a network namespace I need to be able
to have multiple network devices with the same name.  Currently this
is a problem for /sys/class/net/*. 

What I want is a separate /sys/class/net directory in sysfs for each
network namespace, and I want to name each of them /sys/class/net.

I looked and the VFS actually allows that.  All that is needed is
for /sys/class/net to implement a follow link method to redirect
lookups to the real directory you want. 

Implementing a follow link method that is sensitive to the current
network namespace turns out to be 3 lines of code so it looks like a
clean approach.  Modifying sysfs so it doesn't get in my was is a bit
trickier. 

I am calling the concept of multiple directories all at the same path
in the filesystem shadow directories.  With the directory entry really
at that location the shadow master. 

The following patch modifies sysfs so it can handle a directory
structure slightly different from the kobject tree so I can implement
the shadow directories for handling /sys/class/net/.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 10:37:14 -08:00
..
reed_solomon fix file specification in comments 2006-10-03 23:01:26 +02:00
zlib_deflate [PATCH] zlib_inflate: Upgrade library code to a recent version 2006-06-22 15:05:58 -07:00
zlib_inflate [PATCH] Fix ppc32 zImage inflate 2006-07-31 13:28:37 -07:00
.gitignore
audit.c [PATCH] fix missing ifdefs in syscall classes hookup for generic targets 2006-09-22 17:48:56 -07:00
bitmap.c [PATCH] bitmap: parse input from kernel and user buffers 2006-10-11 11:14:22 -07:00
bitrev.c [PATCH] add MODULE_* attributes to bit reversal library 2006-12-10 10:07:52 -08:00
bug.c [PATCH] Generic BUG implementation 2006-12-08 08:28:39 -08:00
bust_spinlocks.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cmdline.c [PATCH] get_options to allow a hypenated range for isolcpus 2006-12-07 08:39:35 -08:00
cpumask.c [PATCH] highest_possible_node_id() linkage fix 2006-10-20 10:26:43 -07:00
crc16.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
crc32.c [PATCH] crc32: replace bitreverse by bitrev32 2006-12-08 08:28:39 -08:00
crc32defs.h
crc-ccitt.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
ctype.c
debug_locks.c [PATCH] lockdep: better lock debugging 2006-07-03 15:27:01 -07:00
dec_and_lock.c [PATCH] atomic: dec_and_lock use atomic primitives 2006-01-08 20:13:48 -08:00
div64.c
dump_stack.c
extable.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
fault-inject.c Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
find_next_bit.c [PATCH] bitops: generic ext2_{set,clear,test,find_first_zero,find_next_zero}_bit() 2006-03-26 08:57:11 -08:00
gen_crc32table.c
genalloc.c [PATCH] make genpool allocator adhere to kernel-doc standards 2006-10-02 07:57:12 -07:00
halfmd4.c
hweight.c [PATCH] optimize hweight64 for x86_64 2006-09-26 10:52:38 +02:00
idr.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
inflate.c
int_sqrt.c [PATCH] lib: Fix bug in int_sqrt() for 64 bit longs 2006-02-03 08:32:08 -08:00
iomap_copy.c [PATCH] add __iowrite64_copy 2006-06-20 20:24:58 -07:00
iomap.c [PATCH] Arch provides generic iomap missing accessors 2006-12-04 15:59:52 +11:00
ioremap.c [PATCH] uml problems with linux/io.h 2006-12-13 09:05:52 -08:00
irq_regs.c [PATCH] irq_reqs: export __irq_regs 2006-10-06 08:53:40 -07:00
Kconfig [PATCH] uml problems with linux/io.h 2006-12-13 09:05:52 -08:00
Kconfig.debug Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
kernel_lock.c [PATCH] lockdep: prove spinlock rwlock locking correctness 2006-07-03 15:27:04 -07:00
klist.c Driver core: Don't call put methods while holding a spinlock 2006-09-25 21:08:40 -07:00
kobject_uevent.c kobject: kobject_uevent() returns manageable value 2006-12-20 10:56:44 -08:00
kobject.c sysfs: Shadow directory support 2007-02-07 10:37:14 -08:00
kref.c kref refcnt and false positives 2006-12-20 10:56:43 -08:00
libcrc32c.c [PATCH] constify libcrc32c table 2006-06-25 10:01:09 -07:00
list_debug.c [PATCH] More list debugging context 2006-12-07 08:39:35 -08:00
locking-selftest-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-mutex.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rsem.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wsem.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest.c [PATCH] lockdep: show more details about self-test failures 2006-12-07 08:39:43 -08:00
Makefile [PATCH] uml problems with linux/io.h 2006-12-13 09:05:52 -08:00
parser.c
percpu_counter.c [PATCH] percpu counter data type changes to suppport more than 2**31 ext3 free blocks counter 2006-06-23 07:43:06 -07:00
plist.c [PATCH] pi-futex: add plist implementation 2006-06-27 17:32:46 -07:00
prio_tree.c
radix-tree.c [PATCH] hotplug CPU: clean up hotcpu_notifier() use 2006-12-07 08:39:39 -08:00
random32.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
rbtree.c [PATCH] rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev 2006-09-30 20:26:56 +02:00
reciprocal_div.c [PATCH] SLAB: use a multiply instead of a divide in obj_to_index() 2006-12-13 09:05:49 -08:00
rwsem-spinlock.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
rwsem.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
semaphore-sleepers.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sha1.c
smp_processor_id.c
sort.c [PATCH] low performance of lib/sort.c 2006-10-03 08:03:41 -07:00
spinlock_debug.c [PATCH] x86: all cpu backtrace 2006-12-07 02:14:01 +01:00
string.c [PATCH] strstrip remove last blank fix 2006-10-28 11:30:54 -07:00
swiotlb.c [IA64] swiotlb abstraction (e.g. for Xen) 2007-02-05 18:53:04 -08:00
textsearch.c Fix typos in doc and comments 2006-11-30 05:32:19 +01:00
ts_bm.c [TEXTSEARCH]: Fix Boyer Moore initialization bug 2006-08-22 14:33:58 -07:00
ts_fsm.c [PATCH] lib/ts_fsm.c: constify structs 2006-09-29 09:18:23 -07:00
ts_kmp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vsprintf.c Fix vsnprintf off-by-one bug 2006-06-28 17:09:34 -07:00