search for: fmode_writ

Displaying 20 results from an estimated 22 matches for "fmode_writ".

Did you mean: fmode_write
2016 Jun 30
1
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...t_sb, &this); > patch.mnt = mntget(movable_inode_mnt); > > inode = new_inode(sb); > .. > .. > inode->i_mapping->a_ops = a_ops; > d_instantiate(path.dentry, inode); > > return alloc_file(&path, FMODE_WRITE | FMODE_READ, f_op); > } > > And in our driver, we can change vma->vm_file with new one. > > int test_mmap(struct file *filp, struct vm_area_structd *vma) > { > struct file *newfile = movable_inode_getfile("[test"], > f...
2016 Jun 30
1
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...t_sb, &this); > patch.mnt = mntget(movable_inode_mnt); > > inode = new_inode(sb); > .. > .. > inode->i_mapping->a_ops = a_ops; > d_instantiate(path.dentry, inode); > > return alloc_file(&path, FMODE_WRITE | FMODE_READ, f_op); > } > > And in our driver, we can change vma->vm_file with new one. > > int test_mmap(struct file *filp, struct vm_area_structd *vma) > { > struct file *newfile = movable_inode_getfile("[test"], > f...
2006 May 31
2
Looking for docs on some functions and constants
..., I''m starting to set things up to move win32-open3 towards a pure Ruby solution. I''ve got a windows-pipe module setup, but now I need to define some of the msvcrt IO functions. However, I can''t find documentation on MSDN or my system for the following: FMODE_READABLE FMODE_WRITABLE FMODE_BINMODE MakeOpenFile() io_alloc() A recursive search on my header files didn''t reveal anything. Any ideas? Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly pr...
2009 Mar 31
0
[PATCH] ocfs2: remove some pointless conditionals before kfree()
...tmp_block) - kfree(reg->hr_tmp_block); + kfree(reg->hr_tmp_block); if (reg->hr_slot_data) { for (i = 0; i < reg->hr_num_pages; i++) { @@ -978,8 +977,7 @@ static void o2hb_region_release(struct config_item *item) if (reg->hr_bdev) blkdev_put(reg->hr_bdev, FMODE_READ|FMODE_WRITE); - if (reg->hr_slots) - kfree(reg->hr_slots); + kfree(reg->hr_slots); spin_lock(&o2hb_live_lock); list_del(&reg->hr_all_item); diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 9fbe849..7530d10 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluste...
2016 Jun 27
2
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
On 06/16/2016 11:07 AM, Minchan Kim wrote: > On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote: >> On 06/16/2016 05:56 AM, Minchan Kim wrote: >>> On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote: >>>> On 06/15/2016 08:02 AM, Minchan Kim wrote: >>>>> Hi, >>>>> >>>>> On Mon, Jun 13, 2016 at
2016 Jun 27
2
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
On 06/16/2016 11:07 AM, Minchan Kim wrote: > On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote: >> On 06/16/2016 05:56 AM, Minchan Kim wrote: >>> On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote: >>>> On 06/15/2016 08:02 AM, Minchan Kim wrote: >>>>> Hi, >>>>> >>>>> On Mon, Jun 13, 2016 at
2013 Aug 06
6
[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4
Hi, The following series of patches implements in btrfs an ioctl to do out-of-band deduplication of file extents. To be clear, this means that the file system is mounted and running, but the dedupe is not done during file writes, but after the fact when some userspace software initiates a dedupe. The primary patch is loosely based off of one sent by Josef Bacik back in January, 2011.
2016 Jun 28
0
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...nty = d_alloc_pseudo(movable_inode_mnt->mnt_sb, &this); patch.mnt = mntget(movable_inode_mnt); inode = new_inode(sb); .. .. inode->i_mapping->a_ops = a_ops; d_instantiate(path.dentry, inode); return alloc_file(&path, FMODE_WRITE | FMODE_READ, f_op); } And in our driver, we can change vma->vm_file with new one. int test_mmap(struct file *filp, struct vm_area_structd *vma) { struct file *newfile = movable_inode_getfile("[test"], filep->f_op, &test_aops);...
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
We're currently support two paths from VFS to preallocate unwritten extents(from FS_IOC_RESVSP, or fallocate()), likewise, behavior of punching-hole should be treated as the same, this patch tries to teach file_ioctl() to handle FS_IOC_UNRESVSP, underlying filesystem like ocfs2 is wise enough to do the rest of work;-) Signed-off-by: Tristan Ye <tristan.ye at oracle.com> --- fs/ioctl.c
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
We're currently support two paths from VFS to preallocate unwritten extents(from FS_IOC_RESVSP, or fallocate()), likewise, behavior of punching-hole should be treated as the same, this patch tries to teach file_ioctl() to handle FS_IOC_UNRESVSP, underlying filesystem like ocfs2 is wise enough to do the rest of work;-) Signed-off-by: Tristan Ye <tristan.ye at oracle.com> --- fs/ioctl.c
2001 Mar 28
1
Ext3 and LFS - possible? fatal?
Has anyone tried LFS (ie >2G files support) and Ext3 together? Are there good reasons why this should/should not work? I see the RH enterprise kernel patch set specifically does not attempt both lfs and ext3, but the lfs patches themselves touch some reasonably localised parts of ext2, so I would hope (without having dived in there to test), that the ext3 changes would mirror that
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...MPAT -static long fat_generic_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) - -{ - return fat_generic_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int fat_file_release(struct inode *inode, struct file *filp) { if ((filp->f_mode & FMODE_WRITE) && @@ -209,9 +200,7 @@ const struct file_operations fat_file_operations = { .mmap = generic_file_mmap, .release = fat_file_release, .unlocked_ioctl = fat_generic_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = fat_generic_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, ....
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...MPAT -static long fat_generic_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) - -{ - return fat_generic_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int fat_file_release(struct inode *inode, struct file *filp) { if ((filp->f_mode & FMODE_WRITE) && @@ -209,9 +200,7 @@ const struct file_operations fat_file_operations = { .mmap = generic_file_mmap, .release = fat_file_release, .unlocked_ioctl = fat_generic_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = fat_generic_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, ....
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...be a power of two, and representable by u16 */ + if (!num_descs || (num_descs & (num_descs-1)) || num_descs > 65536) { + err = -EINVAL; + goto out; + } + + fd = get_unused_fd(); + if (fd < 0) { + err = fd; + goto out; + } + + filp = alloc_file(vring_mnt, dget(vring_mnt->mnt_root), FMODE_WRITE, + &vring_fops); + if (!filp) { + err = -ENFILE; + goto put_fd; + } + + filp->private_data = vr = kmalloc(sizeof(*vr), GFP_KERNEL); + if (!vr) { + err = -ENOMEM; + goto put_filp; + } + + /* Set up pointers into ring. */ + vring_init(&vr->ring, num_descs, addr, PAGE_SIZE); + i...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...be a power of two, and representable by u16 */ + if (!num_descs || (num_descs & (num_descs-1)) || num_descs > 65536) { + err = -EINVAL; + goto out; + } + + fd = get_unused_fd(); + if (fd < 0) { + err = fd; + goto out; + } + + filp = alloc_file(vring_mnt, dget(vring_mnt->mnt_root), FMODE_WRITE, + &vring_fops); + if (!filp) { + err = -ENFILE; + goto put_fd; + } + + filp->private_data = vr = kmalloc(sizeof(*vr), GFP_KERNEL); + if (!vr) { + err = -ENOMEM; + goto put_filp; + } + + /* Set up pointers into ring. */ + vring_init(&vr->ring, num_descs, addr, PAGE_SIZE); + i...
2019 Apr 19
0
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...file *filp, unsigned int cmd, > - unsigned long arg) > - > -{ > - return fat_generic_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); > -} > -#endif > - > static int fat_file_release(struct inode *inode, struct file *filp) > { > if ((filp->f_mode & FMODE_WRITE) && > @@ -209,9 +200,7 @@ const struct file_operations fat_file_operations = { > .mmap = generic_file_mmap, > .release = fat_file_release, > .unlocked_ioctl = fat_generic_ioctl, > -#ifdef CONFIG_COMPAT > - .compat_ioctl = fat_generic_compat_ioctl, > -#endif >...
2018 Sep 12
1
[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg
...MPAT -static long fat_generic_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) - -{ - return fat_generic_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int fat_file_release(struct inode *inode, struct file *filp) { if ((filp->f_mode & FMODE_WRITE) && @@ -209,9 +200,7 @@ const struct file_operations fat_file_operations = { .mmap = generic_file_mmap, .release = fat_file_release, .unlocked_ioctl = fat_generic_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = fat_generic_compat_ioctl, -#endif + .compat_ioctl = generic_compat_ioctl_...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...PERM; goto out; } - btrfs_defrag_root(root, 0); - btrfs_defrag_root(root->fs_info->extent_root, 0); + ret = btrfs_defrag_root(root, 0); + if (ret) + goto out; + ret = btrfs_defrag_root(root->fs_info->extent_root, 0); break; case S_IFREG: if (!(file->f_mode & FMODE_WRITE)) { @@ -1365,9 +1367,11 @@ static int btrfs_ioctl_defrag(struct fil /* the rest are all set to zero by kzalloc */ range->len = (u64)-1; } - btrfs_defrag_file(file, range); + ret = btrfs_defrag_file(file, range); kfree(range); break; + default: + ret = -EINVAL; } out: mn...
2009 Jan 28
2
[PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
...len <= 0) - goto out; + return -EINVAL; /* Return error if mode is not supported */ - ret = -EOPNOTSUPP; if (mode && !(mode & FALLOC_FL_KEEP_SIZE)) - goto out; + return -EOPNOTSUPP; - ret = -EBADF; - file = fget(fd); - if (!file) - goto out; if (!(file->f_mode & FMODE_WRITE)) - goto out_fput; + return -EBADF; /* * Revalidate the write permissions, in case security policy has * changed since the files were opened. */ ret = security_file_permission(file, MAY_WRITE); if (ret) - goto out_fput; + return ret; - inode = file->f_path.dentry->d_inod...
2019 Jul 30
2
[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl
...MPAT -static long fat_generic_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) - -{ - return fat_generic_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int fat_file_release(struct inode *inode, struct file *filp) { if ((filp->f_mode & FMODE_WRITE) && @@ -215,9 +206,7 @@ const struct file_operations fat_file_operations = { .mmap = generic_file_mmap, .release = fat_file_release, .unlocked_ioctl = fat_generic_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = fat_generic_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, ....