Comment 3 for bug 548924

Revision history for this message
Amit Kucheria (amitk) wrote :

This[1] is not an oops, but a BUG_ON() called on purpose inside the aufs code. The function follows:

static int do_open_nondir(struct file *file, int flags)
{
 int err;
 aufs_bindex_t bindex;
 struct file *h_file;
 struct dentry *dentry;
 struct au_finfo *finfo;

 FiMustWriteLock(file);

 err = 0;
 dentry = file->f_dentry;
 finfo = au_fi(file);
 finfo->fi_h_vm_ops = NULL;
 finfo->fi_vm_ops = NULL;
 bindex = au_dbstart(dentry);
 /* O_TRUNC is processed already */
 BUG_ON(au_test_ro(dentry->d_sb, bindex, dentry->d_inode)
        && (flags & O_TRUNC));

 h_file = au_h_open(dentry, bindex, flags, file);
 if (IS_ERR(h_file))
  err = PTR_ERR(h_file);
 else {
  au_set_fbstart(file, bindex);
  au_set_fbend(file, bindex);
  au_set_h_fptr(file, bindex, h_file);
  au_update_figen(file);
  /* todo: necessary? */
  /* file->f_ra = h_file->f_ra; */
 }
 return err;
}

From the fragment, triggering the BUG_ON(), it seems to check if the aufs file/branch is readonly and if a truncate flag is set on the file.

So my question then is, are we doing something illegal according to aufs expectations?

[1] kernel BUG at /build/buildd/linux-ti-omap-2.6.33/ubuntu/aufs/f_op.c:84!