Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0d786d4a2773f06a791e8c3730d049077fb81df6
Commit:     0d786d4a2773f06a791e8c3730d049077fb81df6
Parent:     4f640efb3170dbcf99a37a3cc99060647b95428c
Author:     Ulrich Drepper <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 18:43:46 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 24 12:24:58 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/open.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/open.c b/fs/open.c
index a6b054e..e27c205 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)
        if (inode->i_op && inode->i_op->fallocate)
                ret = inode->i_op->fallocate(inode, mode, offset, len);
        else
-               ret = -ENOSYS;
+               ret = -EOPNOTSUPP;
 
 out_fput:
        fput(file);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to