• Andrew Morton's avatar
    [PATCH] is_subdir locking fix · b5a660ee
    Andrew Morton authored
    From: Maneesh Soni <maneesh@in.ibm.com>
    
    o The following patch fixes is_subdir() races with d_move. Due to concurrent
      d_move, in is_subdir() we can end up accessing freed d_parent pointer in
      case of pre-emptible kernel. To avoid this we can use rcu_read_lock() and
      rcu_read_unlock().
    
    o This also fixes the seqlock uses in is_subdir() as we need to restart the
      the inner loop with the origianl new_dentry passed to the routine in case
      of any rename occured while we are traversing d_parent links.
    b5a660ee
dcache.c 41.4 KB