Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb33ed63 authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

AFS: Fix afs_prepare_write()



afs_prepare_write() should not mark a page up to date if it only partially
fills it in, in expectation of the caller filling in the rest prior to calling
commit_write().  commit_write(), however, should mark the page up to date.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 18007820
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page,
			_leave(" = %d [prep]", ret);
			return ret;
		}
		SetPageUptodate(page);
	}

try_again:
@@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page,
		spin_unlock(&vnode->writeback_lock);
	}

	SetPageUptodate(page);
	set_page_dirty(page);

	if (PageDirty(page))
		_debug("dirtied");