mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
Merge remote-tracking branch 'ovl/rename2' into for-linus
This commit is contained in:
commit
3873691e5a
483 changed files with 4379 additions and 2736 deletions
|
|
@ -4271,13 +4271,10 @@ int btrfs_check_data_free_space(struct inode *inode, u64 start, u64 len)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Use new btrfs_qgroup_reserve_data to reserve precious data space
|
||||
*
|
||||
* TODO: Find a good method to avoid reserve data space for NOCOW
|
||||
* range, but don't impact performance on quota disable case.
|
||||
*/
|
||||
/* Use new btrfs_qgroup_reserve_data to reserve precious data space. */
|
||||
ret = btrfs_qgroup_reserve_data(inode, start, len);
|
||||
if (ret)
|
||||
btrfs_free_reserved_data_space_noquota(inode, start, len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10566,7 +10566,7 @@ static const struct inode_operations btrfs_dir_inode_operations = {
|
|||
.link = btrfs_link,
|
||||
.mkdir = btrfs_mkdir,
|
||||
.rmdir = btrfs_rmdir,
|
||||
.rename2 = btrfs_rename2,
|
||||
.rename = btrfs_rename2,
|
||||
.symlink = btrfs_symlink,
|
||||
.setattr = btrfs_setattr,
|
||||
.mknod = btrfs_mknod,
|
||||
|
|
|
|||
|
|
@ -1634,6 +1634,9 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
|
|||
int namelen;
|
||||
int ret = 0;
|
||||
|
||||
if (!S_ISDIR(file_inode(file)->i_mode))
|
||||
return -ENOTDIR;
|
||||
|
||||
ret = mnt_want_write_file(file);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
|
@ -1691,6 +1694,9 @@ static noinline int btrfs_ioctl_snap_create(struct file *file,
|
|||
struct btrfs_ioctl_vol_args *vol_args;
|
||||
int ret;
|
||||
|
||||
if (!S_ISDIR(file_inode(file)->i_mode))
|
||||
return -ENOTDIR;
|
||||
|
||||
vol_args = memdup_user(arg, sizeof(*vol_args));
|
||||
if (IS_ERR(vol_args))
|
||||
return PTR_ERR(vol_args);
|
||||
|
|
@ -1714,6 +1720,9 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,
|
|||
bool readonly = false;
|
||||
struct btrfs_qgroup_inherit *inherit = NULL;
|
||||
|
||||
if (!S_ISDIR(file_inode(file)->i_mode))
|
||||
return -ENOTDIR;
|
||||
|
||||
vol_args = memdup_user(arg, sizeof(*vol_args));
|
||||
if (IS_ERR(vol_args))
|
||||
return PTR_ERR(vol_args);
|
||||
|
|
@ -2357,6 +2366,9 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
|||
int ret;
|
||||
int err = 0;
|
||||
|
||||
if (!S_ISDIR(dir->i_mode))
|
||||
return -ENOTDIR;
|
||||
|
||||
vol_args = memdup_user(arg, sizeof(*vol_args));
|
||||
if (IS_ERR(vol_args))
|
||||
return PTR_ERR(vol_args);
|
||||
|
|
|
|||
Loading…
Reference in a new issue