~ubuntu-branches/ubuntu/vivid/aufs/vivid

« back to all changes in this revision

Viewing changes to fs/aufs25/inode.c

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-08-21 14:58:54 UTC
  • mfrom: (1.1.8 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080821145854-4b49x09r4zmvlk5o
Tags: 0+20080719-4
01_vserver_apparmor.dpatch: [UPDATE] Disable vserver patches on kernel 
2.6.26, because they are not needed anymore. (Closes: #495921)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
/*
20
20
 * inode functions
21
21
 *
22
 
 * $Id: inode.c,v 1.4 2008/05/26 04:04:25 sfjro Exp $
 
22
 * $Id: inode.c,v 1.7 2008/07/14 00:16:33 sfjro Exp $
23
23
 */
24
24
 
25
25
#include "aufs.h"
43
43
        new_sz = sizeof(*iinfo->ii_hinode) * (bend + 1);
44
44
        iinfo = au_ii(inode);
45
45
        p = au_kzrealloc(iinfo->ii_hinode, sizeof(*p) * (iinfo->ii_bend + 1),
46
 
                         new_sz, GFP_KERNEL);
 
46
                         new_sz, GFP_NOFS);
47
47
        if (unlikely(!p))
48
48
                goto out;
49
49
 
212
212
                goto out;
213
213
        }
214
214
 
 
215
        /* do not set inotify for whiteouted dirs (SHWH mode) */
215
216
        flags = au_hi_flags(inode, isdir);
 
217
        if (unlikely(au_opt_test(au_mntflags(dentry->d_sb), SHWH)
 
218
                     && au_ftest_hi(flags, NOTIFY)
 
219
                     && dentry->d_name.len > AUFS_WH_PFX_LEN
 
220
                     && !memcmp(dentry->d_name.name, AUFS_WH_PFX,
 
221
                                AUFS_WH_PFX_LEN)))
 
222
                au_fclr_hi(flags, NOTIFY);
216
223
        iinfo = au_ii(inode);
217
224
        iinfo->ii_bstart = bstart;
218
225
        iinfo->ii_bend = btail;
253
260
 
254
261
        err = 0;
255
262
        h_dinode = au_h_dptr(dentry, au_dbstart(dentry))->d_inode;
256
 
        mutex_lock_nested(&inode->i_mutex, AuLsc_I_CHILD);
257
 
        ii_write_lock_new(inode);
 
263
        /* mutex_lock_nested(&inode->i_mutex, AuLsc_I_CHILD); */
 
264
        ii_write_lock_new_child(inode);
258
265
        bend = au_ibend(inode);
259
266
        for (bindex = au_ibstart(inode); bindex <= bend; bindex++) {
260
267
                h_inode = au_h_iptr(inode, bindex);
270
277
        }
271
278
        if (unlikely(err))
272
279
                ii_write_unlock(inode);
273
 
        mutex_unlock(&inode->i_mutex);
 
280
        /* mutex_unlock(&inode->i_mutex); */
274
281
 
275
282
 out:
276
283
        AuTraceErr(err);
319
326
 
320
327
        LKTRTrace("%lx, new %d\n", inode->i_state, !!(inode->i_state & I_NEW));
321
328
        if (inode->i_state & I_NEW) {
322
 
                ii_write_lock_new(inode);
 
329
                ii_write_lock_new_child(inode);
323
330
                err = set_inode(inode, dentry);
324
331
                unlock_new_inode(inode);
325
332
                if (!err)