1. 13 Sep, 2011 2 commits
    • Sachin Prabhu's avatar
      nfs: Do not allow multiple mounts on same mountpoint when using -o noac · fb2088cc
      Sachin Prabhu authored
      Do not allow multiple mounts on same mountpoint when using -o noac
      
      When you normally attempt to mount a share twice on the same mountpoint,
      a check in do_add_mount causes it to return an error
      
      # mount localhost:/nfsv3 /mnt
      # mount localhost:/nfsv3 /mnt
      mount.nfs: /mnt is already mounted or busy
      
      However when using the option 'noac', the user is able to mount the same
      share on the same mountpoint multiple times. This happens because a
      share mounted with the noac option is automatically assigned the 'sync'
      flag MS_SYNCHRONOUS in nfs_initialise_sb(). This flag is set after the
      check for already existing superblocks is done in sget(). The check for
      the mount flags in nfs_compare_mount_options() does not take into
      account the 'sync' flag applied later on in the code path. This means
      that when using 'noac', a new superblock structure is assigned for every
      new mount of the same share and multiple shares on the same mountpoint
      are allowed.
      
      ie.
      # mount -onoac localhost:/nfsv3 /mnt
      can be run multiple times.
      
      The patch checks for noac and assigns the sync flag before sget() is
      called to obtain an already existing superblock structure.
      Signed-off-by: default avatarSachin Prabhu <sprabhu@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      fb2088cc
    • Trond Myklebust's avatar
      NFS: Fix a typo in nfs_flush_multi · f13c3620
      Trond Myklebust authored
      Fix a typo which causes an Oops in the RPC layer, when using wsize < 4k.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Tested-by: default avatarSricharan R <r.sricharan@ti.com>
      f13c3620
  2. 24 Aug, 2011 12 commits
  3. 23 Aug, 2011 16 commits
  4. 22 Aug, 2011 10 commits