aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-23 21:43:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-24 15:24:58 -0400
commit0d786d4a2773f06a791e8c3730d049077fb81df6 (patch)
treede553420b6b1a70b80034385ff94eb706bac12ab /fs
parent4f640efb3170dbcf99a37a3cc99060647b95428c (diff)
fallocate syscall interface deficiency
The fallocate syscall returns ENOSYS in case the filesystem does not support the operation and expects the userlevel code to fill in. This is good in concept. The problem is that the libc code for old kernels should be able to distinguish the case where the syscall is not at all available vs not functioning for a specific mount point. As is this is not possible and we always have to invoke the syscall even if the kernel doesn't support it. I suggest the following patch. Using EOPNOTSUPP is IMO the right thing to do. Cc: Amit Arora <aarora@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index a6b054edacba..e27c205364d3 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -403,7 +403,7 @@ asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len)
403 if (inode->i_op && inode->i_op->fallocate) 403 if (inode->i_op && inode->i_op->fallocate)
404 ret = inode->i_op->fallocate(inode, mode, offset, len); 404 ret = inode->i_op->fallocate(inode, mode, offset, len);
405 else 405 else
406 ret = -ENOSYS; 406 ret = -EOPNOTSUPP;
407 407
408out_fput: 408out_fput:
409 fput(file); 409 fput(file);