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

Commit c718a975 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Linus Torvalds
Browse files

fs: semove set but not checked AOP_FLAG_UNINTERRUPTIBLE flag

Commit afddba49 ("fs: introduce write_begin, write_end, and
perform_write aops") introduced AOP_FLAG_UNINTERRUPTIBLE flag which was
checked in pagecache_write_begin(), but that check was removed by
4e02ed4b ("fs: remove prepare_write/commit_write").

Between these two commits, commit d9414774 ("cifs: Convert cifs to
new aops.") added a check in cifs_write_begin(), but that check was soon
removed by commit a98ee8c1 ("[CIFS] fix regression in
cifs_write_begin/cifs_write_end").

Therefore, AOP_FLAG_UNINTERRUPTIBLE flag is checked nowhere.  Let's
remove this flag.  This patch has no functionality changes.

Link: http://lkml.kernel.org/r/1489294781-53494-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp


Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Nick Piggin <npiggin@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f44a2920
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -694,8 +694,7 @@ struct address_space_operations {

  write_end: After a successful write_begin, and data copy, write_end must
        be called. len is the original len passed to write_begin, and copied
        is the amount that was able to be copied (copied == len is always true
	if write_begin was called with the AOP_FLAG_UNINTERRUPTIBLE flag).
        is the amount that was able to be copied.

        The filesystem must take care of unlocking the page and releasing it
        refcount, and updating i_size.
+5 −8
Original line number Diff line number Diff line
@@ -2379,8 +2379,7 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size)
		goto out;

	err = pagecache_write_begin(NULL, mapping, size, 0,
				AOP_FLAG_UNINTERRUPTIBLE|AOP_FLAG_CONT_EXPAND,
				&page, &fsdata);
				    AOP_FLAG_CONT_EXPAND, &page, &fsdata);
	if (err)
		goto out;

@@ -2415,8 +2414,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,
		}
		len = PAGE_SIZE - zerofrom;

		err = pagecache_write_begin(file, mapping, curpos, len,
						AOP_FLAG_UNINTERRUPTIBLE,
		err = pagecache_write_begin(file, mapping, curpos, len, 0,
					    &page, &fsdata);
		if (err)
			goto out;
@@ -2449,8 +2447,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,
		}
		len = offset - zerofrom;

		err = pagecache_write_begin(file, mapping, curpos, len,
						AOP_FLAG_UNINTERRUPTIBLE,
		err = pagecache_write_begin(file, mapping, curpos, len, 0,
					    &page, &fsdata);
		if (err)
			goto out;
+1 −2
Original line number Diff line number Diff line
@@ -405,8 +405,7 @@ int exofs_set_link(struct inode *dir, struct exofs_dir_entry *de,
	int err;

	lock_page(page);
	err = exofs_write_begin(NULL, page->mapping, pos, len,
				AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
	err = exofs_write_begin(NULL, page->mapping, pos, len, 0, &page, NULL);
	if (err)
		EXOFS_ERR("exofs_set_link: exofs_write_begin FAILED => %d\n",
			  err);
+2 −2
Original line number Diff line number Diff line
@@ -485,8 +485,8 @@ void hfs_file_truncate(struct inode *inode)

		/* XXX: Can use generic_cont_expand? */
		size = inode->i_size - 1;
		res = pagecache_write_begin(NULL, mapping, size+1, 0,
				AOP_FLAG_UNINTERRUPTIBLE, &page, &fsdata);
		res = pagecache_write_begin(NULL, mapping, size+1, 0, 0,
					    &page, &fsdata);
		if (!res) {
			res = pagecache_write_end(NULL, mapping, size+1, 0, 0,
					page, fsdata);
+2 −3
Original line number Diff line number Diff line
@@ -545,8 +545,7 @@ void hfsplus_file_truncate(struct inode *inode)
		void *fsdata;
		loff_t size = inode->i_size;

		res = pagecache_write_begin(NULL, mapping, size, 0,
						AOP_FLAG_UNINTERRUPTIBLE,
		res = pagecache_write_begin(NULL, mapping, size, 0, 0,
					    &page, &fsdata);
		if (res)
			return;
Loading