static int syncquotas(int type) { struct quota_handle **handles, *h; int i, ret = 0; if (flags & FL_ALL) { if (sync_one(type, NULL) < 0) { errstr(_("%s quota sync failed: %s\n"), _(type2name(type)), strerror(errno)); ret = -1; } return ret; } handles = create_handle_list(mntcnt, mnt, type, fmt, IOI_READONLY, MS_LOCALONLY | MS_NO_AUTOFS); for (i = 0; handles[i]; i++) { h = handles[i]; if (sync_one(type, h->qh_quotadev)) { errstr(_("%s quota sync failed for %s: %s\n"), _(type2name(type)), h->qh_quotadev, strerror(errno)); ret = -1; } } dispose_handle_list(handles); return ret; }
static error_t parser (int key, char *arg, struct argp_state *state) { switch (key) { case 's': synchronous = 1; break; case 'c': do_children = 0; break; case ARGP_KEY_NO_ARGS: sync_one ("/", getcrdir ()); break; case ARGP_KEY_ARG: sync_one (arg, file_name_lookup (arg, 0, 0)); break; default: return ARGP_ERR_UNKNOWN; } return 0; }
/* * Needed by knfsd */ void write_inode_now(struct inode *inode) { struct super_block * sb = inode->i_sb; if (sb) { spin_lock(&inode_lock); while (inode->i_state & I_DIRTY) sync_one(inode); spin_unlock(&inode_lock); } else printk("write_inode_now: no super block\n"); }