~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to ubuntu/aufs/dinfo.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
        return d;
323
323
}
324
324
 
 
325
/*
 
326
 * extended version of au_h_dptr().
 
327
 * returns a hashed and positive h_dentry in bindex, NULL, or error.
 
328
 */
 
329
struct dentry *au_h_d_alias(struct dentry *dentry, aufs_bindex_t bindex)
 
330
{
 
331
        struct dentry *h_dentry;
 
332
        struct inode *inode, *h_inode;
 
333
 
 
334
        inode = dentry->d_inode;
 
335
        AuDebugOn(!inode);
 
336
 
 
337
        h_dentry = NULL;
 
338
        if (au_dbstart(dentry) <= bindex
 
339
            && bindex <= au_dbend(dentry))
 
340
                h_dentry = au_h_dptr(dentry, bindex);
 
341
        if (h_dentry && !au_d_hashed_positive(h_dentry)) {
 
342
                dget(h_dentry);
 
343
                goto out; /* success */
 
344
        }
 
345
 
 
346
        AuDebugOn(bindex < au_ibstart(inode));
 
347
        AuDebugOn(au_ibend(inode) < bindex);
 
348
        h_inode = au_h_iptr(inode, bindex);
 
349
        h_dentry = d_find_alias(h_inode);
 
350
        if (h_dentry) {
 
351
                if (!IS_ERR(h_dentry)) {
 
352
                        if (!au_d_hashed_positive(h_dentry))
 
353
                                goto out; /* success */
 
354
                        dput(h_dentry);
 
355
                } else
 
356
                        goto out;
 
357
        }
 
358
 
 
359
        if (au_opt_test(au_mntflags(dentry->d_sb), PLINK)) {
 
360
                h_dentry = au_plink_lkup(inode, bindex);
 
361
                AuDebugOn(!h_dentry);
 
362
                if (!IS_ERR(h_dentry)) {
 
363
                        if (!au_d_hashed_positive(h_dentry))
 
364
                                goto out; /* success */
 
365
                        dput(h_dentry);
 
366
                        h_dentry = NULL;
 
367
                }
 
368
        }
 
369
 
 
370
out:
 
371
        AuDbgDentry(h_dentry);
 
372
        return h_dentry;
 
373
}
 
374
 
325
375
aufs_bindex_t au_dbtail(struct dentry *dentry)
326
376
{
327
377
        aufs_bindex_t bend, bwh;