/* You have to be very careful that these write counts get cleaned up in error cases and upon __fput(). This should probably never be called outside of __dentry_open().  */
static int __get_file_write_access(struct inode *inode, struct vfsmount *mnt)
/* You have to be very careful that these write counts get cleaned up in error cases and upon __fput(). This should probably never be called outside of __dentry_open().  */
static int __get_file_write_access(struct inode *inode, struct vfsmount *mnt)
{
	int error;
	error = get_write_access(inode);
	if (error)
		return error;
	if (!special_file(inode->i_mode)) {
		error = mnt_want_write(mnt);
		if (error)
			put_write_access(inode);
	}
	return error;
}