linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/8] 2.6.22-rc4-mm2 buffered write fixes
@ 2007-06-14  2:34 Nick Piggin
  2007-06-14  2:35 ` [patch 2/8] " Nick Piggin
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Nick Piggin @ 2007-06-14  2:34 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-fsdevel, cmm, Badari Pulavarty, Dmitriy Monakhov,
	mark.fasheh

Here are several fixes for issues that Dmitriy found, and also several
fixlets for non-compiling filesystems.

These only caused one trivial down-stack reject, so I won't worry about
sending you the fix for that.

These have had some testing with various filesystems, block sizes, and
journal modes with fsx-linux, fsstress and swapping-kbuilds.

--

Dmitriy noticed some weird code I had in __page_symlink that is wrong.

Fixes: fs-introduce-write_begin-write_end-and-perform_write-aops.patch

Signed-off-by: Nick Piggin <npiggin@suse.de>

Index: linux-2.6/fs/namei.c
===================================================================
--- linux-2.6.orig/fs/namei.c
+++ linux-2.6/fs/namei.c
@@ -2702,21 +2702,20 @@ int __page_symlink(struct inode *inode, 
 	char *kaddr;
 
 retry:
-	err = pagecache_write_begin(NULL, mapping, 0, PAGE_CACHE_SIZE,
+	err = pagecache_write_begin(NULL, mapping, 0, len-1,
 				AOP_FLAG_UNINTERRUPTIBLE, &page, &fsdata);
 	if (err)
 		goto fail;
 
 	kaddr = kmap_atomic(page, KM_USER0);
 	memcpy(kaddr, symname, len-1);
-	memset(kaddr+len-1, 0, PAGE_CACHE_SIZE-(len-1));
 	kunmap_atomic(kaddr, KM_USER0);
 
-	err = pagecache_write_end(NULL, mapping, 0, PAGE_CACHE_SIZE, PAGE_CACHE_SIZE,
+	err = pagecache_write_end(NULL, mapping, 0, len-1, len-1,
 							page, fsdata);
 	if (err < 0)
 		goto fail;
-	if (err < PAGE_CACHE_SIZE)
+	if (err < len-1)
 		goto retry;
 
 	mark_inode_dirty(inode);

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-06-14  2:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14  2:34 [patch 1/8] 2.6.22-rc4-mm2 buffered write fixes Nick Piggin
2007-06-14  2:35 ` [patch 2/8] " Nick Piggin
2007-06-14  2:36 ` [patch 3/8] " Nick Piggin
2007-06-14  2:37 ` [patch 4/8] " Nick Piggin
2007-06-14  2:39 ` [patch 4/8] minix: convert to new aops fix Nick Piggin
2007-06-14  2:40 ` [patch 6/8] sysv: " Nick Piggin
2007-06-14  2:41 ` [patch 7/8] ufs: " Nick Piggin
2007-06-14  2:42 ` [patch 8/8] reiser4: fix for new aops patches Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).