Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8268f5a7415d914fc855a86aa2284ac819dc6b2e
Commit:     8268f5a7415d914fc855a86aa2284ac819dc6b2e
Parent:     afddba49d18f346e5cc2938b6ed7c512db18ca68
Author:     Dmitry Monakhov <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:25:02 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:42:55 2007 -0700

    deny partial write for loop dev fd
    
    Partial write can be easily supported by LO_CRYPT_NONE mode, but it is not
    easy in LO_CRYPT_CRYPTOAPI case, because of its block nature.  I don't know
    who still used cryptoapi, but theoretically it is possible.  So let's leave
    things as they are.  Loop device doesn't support partial write before
    Nick's "write_begin/write_end" patch set, and let's it behave the same way
    after.
    
    Signed-off-by: Dmitriy Monakhov <[EMAIL PROTECTED]>
    Cc: Nick Piggin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/block/loop.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index a5f993a..e5a0515 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -245,10 +245,8 @@ static int do_lo_send_aops(struct loop_device *lo, struct 
bio_vec *bvec,
 
                ret = pagecache_write_end(file, mapping, pos, size, copied,
                                                        page, fsdata);
-               if (ret < 0)
+               if (ret < 0 || ret != copied)
                        goto fail;
-               if (ret < copied)
-                       copied = ret;
 
                if (unlikely(transfer_result))
                        goto fail;
-
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