search for: btrfs_ioctl_inode_flag

Displaying 1 result from an estimated 1 matches for "btrfs_ioctl_inode_flag".

2009 Jun 13
1
[PATCH 1/3] Add ioctl to set per file 'compress' flag
...u.edu> Index: newformat2/fs/btrfs/ioctl.c =================================================================== --- newformat2.orig/fs/btrfs/ioctl.c +++ newformat2/fs/btrfs/ioctl.c @@ -1240,6 +1240,54 @@ out: return ret; } +/* Ioctl function to set or clear a flag on the file. */ +static long btrfs_ioctl_inode_flag(struct file *file, + u32 flag, int set) +{ + struct inode *inode = file->f_path.dentry->d_inode; + struct btrfs_inode *ip = BTRFS_I(inode); + struct btrfs_root *root = ip->root; + struct btrfs_trans_handle *trans; + int ret; + + if (!is_owner_or_cap(inode)) + return -EACCES; + + mutex_...