/* Since mvdown succeeded, we ignore an error of this function */ static void au_do_stfs(const unsigned char dmsg, struct au_mvd_args *a) { int err; struct au_branch *br; a->mvdown.flags |= AUFS_MVDOWN_STFS_FAILED; br = au_sbr(a->sb, a->mvd_bsrc); err = au_br_stfs(br, &a->mvdown.stbr[AUFS_MVDOWN_UPPER].stfs); if (!err) { br = au_sbr(a->sb, a->mvd_bdst); a->mvdown.stbr[AUFS_MVDOWN_LOWER].brid = br->br_id; err = au_br_stfs(br, &a->mvdown.stbr[AUFS_MVDOWN_LOWER].stfs); } if (!err) a->mvdown.flags &= ~AUFS_MVDOWN_STFS_FAILED; else AU_MVD_PR(dmsg, "statfs failed (%d), ignored\n", err); }
static int au_fhsm_stfs(struct super_block *sb, aufs_bindex_t bindex, struct aufs_stfs *rstfs, int do_lock, int do_notify) { int err; struct au_branch *br; struct au_br_fhsm *bf; br = au_sbr(sb, bindex); AuDebugOn(au_br_rdonly(br)); bf = br->br_fhsm; AuDebugOn(!bf); if (do_lock) mutex_lock(&bf->bf_lock); else MtxMustLock(&bf->bf_lock); /* sb->s_root for NFS is unreliable */ err = au_br_stfs(br, &bf->bf_stfs); if (unlikely(err)) { AuErr1("FHSM failed (%d), b%d, ignored.\n", bindex, err); goto out; } bf->bf_jiffy = jiffies; bf->bf_readable = 1; if (do_notify) au_fhsm_notify(sb, /*val*/1); if (rstfs) *rstfs = bf->bf_stfs; out: if (do_lock) mutex_unlock(&bf->bf_lock); au_fhsm_notify(sb, /*val*/1); return err; }