All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Bankett <chaosman@ontika.net>
To: linux-fsdevel@vger.kernel.org
Subject: [PATCH] qnx4fs: small cleanup
Date: Mon, 13 Feb 2012 02:43:41 +0100	[thread overview]
Message-ID: <4F386ACD.2010908@ontika.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

Small qnx4 cleanup patch.
- removes .writepage, .write_begin and .write_end (+callback functions)
- removes '.' path checking in namei.c (handled on upper layers)

Signed-off-by: Kai Bankett <chaosman@ontika.net>
---
  inode.c |   27 ---------------------------
  namei.c |    4 ----
  2 files changed, 31 deletions(-)



[-- Attachment #2: patch-3.2.5-qnx4-cleanup1 --]
[-- Type: text/plain, Size: 2109 bytes --]

diff -Nurp linux-3.2.5.orig/fs/qnx4/inode.c linux-3.2.5-qnx4-cleanup/fs/qnx4/inode.c
--- linux-3.2.5.orig/fs/qnx4/inode.c	2012-02-06 18:47:00.000000000 +0100
+++ linux-3.2.5-qnx4-cleanup/fs/qnx4/inode.c	2012-02-13 02:22:39.921199183 +0100
@@ -299,44 +299,17 @@ static void qnx4_put_super(struct super_
 	return;
 }
 
-static int qnx4_writepage(struct page *page, struct writeback_control *wbc)
-{
-	return block_write_full_page(page,qnx4_get_block, wbc);
-}
-
 static int qnx4_readpage(struct file *file, struct page *page)
 {
 	return block_read_full_page(page,qnx4_get_block);
 }
 
-static int qnx4_write_begin(struct file *file, struct address_space *mapping,
-			loff_t pos, unsigned len, unsigned flags,
-			struct page **pagep, void **fsdata)
-{
-	struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host);
-	int ret;
-
-	*pagep = NULL;
-	ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
-				qnx4_get_block,
-				&qnx4_inode->mmu_private);
-	if (unlikely(ret)) {
-		loff_t isize = mapping->host->i_size;
-		if (pos + len > isize)
-			vmtruncate(mapping->host, isize);
-	}
-
-	return ret;
-}
 static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
 {
 	return generic_block_bmap(mapping,block,qnx4_get_block);
 }
 static const struct address_space_operations qnx4_aops = {
 	.readpage	= qnx4_readpage,
-	.writepage	= qnx4_writepage,
-	.write_begin	= qnx4_write_begin,
-	.write_end	= generic_write_end,
 	.bmap		= qnx4_bmap
 };
 
diff -Nurp linux-3.2.5.orig/fs/qnx4/namei.c linux-3.2.5-qnx4-cleanup/fs/qnx4/namei.c
--- linux-3.2.5.orig/fs/qnx4/namei.c	2012-02-06 18:47:00.000000000 +0100
+++ linux-3.2.5-qnx4-cleanup/fs/qnx4/namei.c	2012-02-13 02:22:39.921199183 +0100
@@ -39,10 +39,6 @@ static int qnx4_match(int len, const cha
 	} else {
 		namelen = QNX4_SHORT_NAME_MAX;
 	}
-	/* "" means "." ---> so paths like "/usr/lib//libc.a" work */
-	if (!len && (de->di_fname[0] == '.') && (de->di_fname[1] == '\0')) {
-		return 1;
-	}
 	thislen = strlen( de->di_fname );
 	if ( thislen > namelen )
 		thislen = namelen;
Signed-off-by: Kai Bankett <chaosman@ontika.net>

             reply	other threads:[~2012-02-13  0:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13  1:43 Kai Bankett [this message]
2012-02-14  4:00 ` [PATCH] qnx4fs: small cleanup Al Viro
2012-02-15  2:58   ` Kai Bankett
2012-02-15 22:37   ` [PATCH] qnx4fs: small cleanup #2 Kai Bankett
2012-02-16 10:09     ` Al Viro
2012-02-16 17:46       ` Kai Bankett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F386ACD.2010908@ontika.net \
    --to=chaosman@ontika.net \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.