• David Howells's avatar
    afs: Fix missing cell comparison in afs_test_super() · 106bc798
    David Howells authored
    Fix missing cell comparison in afs_test_super().  Without this, any pair
    volumes that have the same volume ID will share a superblock, no matter the
    cell, unless they're in different network namespaces.
    
    Normally, most users will only deal with a single cell and so they won't
    see this.  Even if they do look into a second cell, they won't see a
    problem unless they happen to hit a volume with the same ID as one they've
    already got mounted.
    
    Before the patch:
    
        # ls /afs/grand.central.org/archive
        linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
        # ls /afs/kth.se/
        linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
        # cat /proc/mounts | grep afs
        none /afs afs rw,relatime,dyn,autocell 0 0
        #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0
        #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0
        #grand.central.org:root.archive /afs/kth.se afs ro,relatime 0 0
    
    After the patch:
    
        # ls /afs/grand.central.org/archive
        linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
        # ls /afs/kth.se/
        admin/        common/  install/  OldFiles/  service/  system/
        bakrestores/  home/    misc/     pkg/       src/      wsadmin/
        # cat /proc/mounts | grep afs
        none /afs afs rw,relatime,dyn,autocell 0 0
        #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0
        #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0
        #kth.se:root.cell /afs/kth.se afs ro,relatime 0 0
    
    Fixes: ^1da177e4 ("Linux-2.6.12-rc2")
    Reported-by: default avatarCarsten Jacobi <jacobi@de.ibm.com>
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
    Tested-by: default avatarJonathan Billings <jsbillings@jsbillings.org>
    cc: Todd DeSantis <atd@us.ibm.com>
    106bc798
super.c 17.3 KB