~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise-proposed

« back to all changes in this revision

Viewing changes to fs/xfs/xfs_iget.c

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich, Luke Yelavich, Upstream Kernel Changes
  • Date: 2012-04-04 18:49:36 UTC
  • Revision ID: package-import@ubuntu.com-20120404184936-tqu735914muv4wpg
Tags: 3.2.0-22.30
[ Luke Yelavich ]

* [Config] Update configs after rebase against Ubuntu-3.2.0-22.35

[ Upstream Kernel Changes ]

* Low-latency: Rebase against Ubuntu-3.2.0-22.35

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
                        BUG();
354
354
        }
355
355
 
 
356
        /*
 
357
         * These values must be set before inserting the inode into the radix
 
358
         * tree as the moment it is inserted a concurrent lookup (allowed by the
 
359
         * RCU locking mechanism) can find it and that lookup must see that this
 
360
         * is an inode currently under construction (i.e. that XFS_INEW is set).
 
361
         * The ip->i_flags_lock that protects the XFS_INEW flag forms the
 
362
         * memory barrier that ensures this detection works correctly at lookup
 
363
         * time.
 
364
         */
 
365
        ip->i_udquot = ip->i_gdquot = NULL;
 
366
        xfs_iflags_set(ip, XFS_INEW);
 
367
 
 
368
        /* insert the new inode */
356
369
        spin_lock(&pag->pag_ici_lock);
357
 
 
358
 
        /* insert the new inode */
359
370
        error = radix_tree_insert(&pag->pag_ici_root, agino, ip);
360
371
        if (unlikely(error)) {
361
372
                WARN_ON(error != -EEXIST);
363
374
                error = EAGAIN;
364
375
                goto out_preload_end;
365
376
        }
366
 
 
367
 
        /* These values _must_ be set before releasing the radix tree lock! */
368
 
        ip->i_udquot = ip->i_gdquot = NULL;
369
 
        xfs_iflags_set(ip, XFS_INEW);
370
 
 
371
377
        spin_unlock(&pag->pag_ici_lock);
372
378
        radix_tree_preload_end();
373
379