diff options
author | Anna Schumaker <Anna.Schumaker@netapp.com> | 2014-11-07 14:44:25 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-11-07 16:17:44 -0500 |
commit | 72c72bdf7bf53353d2d8e055194d27f0128be92b (patch) | |
tree | cdca64b1d630c3b7d7c0d5fa9cb500aa9c3a9da6 /fs | |
parent | 9af94fc4e470deab3427d07551725f0bf844ebc8 (diff) | |
download | op-kernel-dev-72c72bdf7bf53353d2d8e055194d27f0128be92b.zip op-kernel-dev-72c72bdf7bf53353d2d8e055194d27f0128be92b.tar.gz |
VFS: Rename do_fallocate() to vfs_fallocate()
This function needs to be exported so it can be used by the NFSD module
when responding to the new ALLOCATE and DEALLOCATE operations in NFS
v4.2. Christoph Hellwig suggested renaming the function to stay
consistent with how other vfs functions are named.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ioctl.c | 2 | ||||
-rw-r--r-- | fs/open.c | 5 |
2 files changed, 4 insertions, 3 deletions
@@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp) return -EINVAL; } - return do_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); + return vfs_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); } static int file_ioctl(struct file *filp, unsigned int cmd, @@ -222,7 +222,7 @@ SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length) #endif /* BITS_PER_LONG == 32 */ -int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) +int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len) { struct inode *inode = file_inode(file); long ret; @@ -298,6 +298,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) sb_end_write(inode->i_sb); return ret; } +EXPORT_SYMBOL_GPL(vfs_fallocate); SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len) { @@ -305,7 +306,7 @@ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len) int error = -EBADF; if (f.file) { - error = do_fallocate(f.file, mode, offset, len); + error = vfs_fallocate(f.file, mode, offset, len); fdput(f); } return error; |