sb->dq_op->drop(inode);
static int vfs_quota_on_inode(struct inode *inode, int type, int format_id){	struct quota_format_type *fmt = find_quota_format(format_id);	struct super_block *sb = inode->i_sb;	struct quota_info *dqopt = sb_dqopt(sb);	int error;	int oldflags = -1;	if (!fmt)		return -ESRCH;	if (!S_ISREG(inode->i_mode)) {		error = -EACCES;		goto out_fmt;	}	if (IS_RDONLY(inode)) {		error = -EROFS;		goto out_fmt;	}	if (!sb->s_op->quota_write || !sb->s_op->quota_read) {		error = -EINVAL;		goto out_fmt;	}	/* As we bypass the pagecache we must now flush the inode so that	 * we see all the changes from userspace... */	write_inode_now(inode, 1);	/* And now flush the block cache so that kernel sees the changes */	invalidate_bdev(sb->s_bdev, 0);	down(&inode->i_sem);	down(&dqopt->dqonoff_sem);	if (sb_has_quota_enabled(sb, type)) {		error = -EBUSY;		goto out_lock;	}	/* We don't want quota and atime on quota files (deadlocks possible)	 * Also nobody should write to the file - we use special IO operations	 * which ignore the immutable bit. */	down_write(&dqopt->dqptr_sem);	oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA);	inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;	up_write(&dqopt->dqptr_sem);	error = -EIO;	dqopt->files[type] = igrab(inode);	if (!dqopt->files[type])		goto out_lock;	error = -EINVAL;	if (!fmt->qf_ops->check_quota_file(sb, type))		goto out_file_init;	dqopt->ops[type] = fmt->qf_ops;	dqopt->info[type].dqi_format = fmt;	INIT_LIST_HEAD(&dqopt->info[type].dqi_dirty_list);	down(&dqopt->dqio_sem);	if ((error = dqopt->ops[type]->read_file_info(sb, type)) < 0) {		up(&dqopt->dqio_sem);		goto out_file_init;	}	up(&dqopt->dqio_sem);	up(&inode->i_sem);	set_enable_flags(dqopt, type);	add_dquot_ref(sb, type);	up(&dqopt->dqonoff_sem);	return 0;out_file_init:	dqopt->files[type] = NULL;	iput(inode);out_lock:	up(&dqopt->dqonoff_sem);	if (oldflags != -1) {		down_write(&dqopt->dqptr_sem);		/* Set the flags back (in the case of accidental quotaon()		 * on a wrong file we don't want to mess up the flags) */		inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE);		inode->i_flags |= oldflags;		up_write(&dqopt->dqptr_sem);	}	up(&inode->i_sem);out_fmt:	put_quota_format(fmt);	return error; }