lkml.org 
[lkml]   [2004]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [2.6 patch] some NTFS cleanups
On Sat, Oct 30, 2004 at 07:57:27PM +0100, Anton Altaparmakov wrote:

> Hi Adrian,

Hi Anton,

> >From a quick read of your patch:
>
> On Sat, 30 Oct 2004, Adrian Bunk wrote:
> > The patch below does the following cleanups for the NTFS code:
> > - remove three currently unused global functions
>
> Assuming these are the functions in unistr.c then they need to stay. We
> are not using them yet but we will when we start creating/deleting files
> and things like that.

OK.

> > - make several functions and variables static (yes, I've read the
>
> Most of those look good, again except the entirety of unistr.c where we
> will be using those functions later on. Admittedly we can make them
> static for now and undo each as it gets a user outside of unistr.c.
>...
> Mostly it is fine; great in fact. I will apply it to the ntfs-2.6-devel
> tree on Monday but I will leave the three functions you have taken out in.
> If you want send me a new patch with the three functions left in before
> Monday and I can apply it as is. (-:
>...

Below is the patch without the unistr.c parts.


diffstat output:
fs/ntfs/aops.c | 4 +---
fs/ntfs/inode.c | 4 ++--
fs/ntfs/ntfs.h | 3 ---
fs/ntfs/super.c | 11 +++++-----
4 files changed, 8 insertions(+), 13 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc1-mm2-full/fs/ntfs/aops.c.old 2004-10-30 14:06:06.000000000 +0200
+++ linux-2.6.10-rc1-mm2-full/fs/ntfs/aops.c 2004-10-30 14:10:51.000000000 +0200
@@ -348,10 +348,8 @@
* for it to be read in before we can do the copy.
*
* Return 0 on success and -errno on error.
- *
- * WARNING: Do not make this function static! It is used by mft.c!
*/
-int ntfs_readpage(struct file *file, struct page *page)
+static int ntfs_readpage(struct file *file, struct page *page)
{
s64 attr_pos;
ntfs_inode *ni, *base_ni;
--- linux-2.6.10-rc1-mm2-full/fs/ntfs/inode.c.old 2004-10-30 14:13:06.000000000 +0200
+++ linux-2.6.10-rc1-mm2-full/fs/ntfs/inode.c 2004-10-30 14:14:17.000000000 +0200
@@ -352,7 +352,7 @@
return NULL;
}

-void ntfs_destroy_extent_inode(ntfs_inode *ni)
+static void ntfs_destroy_extent_inode(ntfs_inode *ni)
{
ntfs_debug("Entering.");
BUG_ON(ni->page);
@@ -2133,7 +2133,7 @@
}
}

-void __ntfs_clear_inode(ntfs_inode *ni)
+static void __ntfs_clear_inode(ntfs_inode *ni)
{
/* Free all alocated memory. */
down_write(&ni->runlist.lock);
--- linux-2.6.10-rc1-mm2-full/fs/ntfs/super.c.old 2004-10-30 14:19:10.000000000 +0200
+++ linux-2.6.10-rc1-mm2-full/fs/ntfs/super.c 2004-10-30 14:24:39.000000000 +0200
@@ -44,6 +44,10 @@
/* Number of mounted file systems which have compression enabled. */
static unsigned long ntfs_nr_compression_users;

+/* A global default upcase table and a corresponding reference count. */
+static ntfschar *default_upcase = NULL;
+static unsigned long ntfs_nr_upcase_users = 0;
+
/* Error constants/strings used in inode.c::ntfs_show_options(). */
typedef enum {
/* One of these must be present, default is ON_ERRORS_CONTINUE. */
@@ -2175,7 +2180,7 @@
/**
* The complete super operations.
*/
-struct super_operations ntfs_sops = {
+static struct super_operations ntfs_sops = {
.alloc_inode = ntfs_alloc_big_inode, /* VFS: Allocate new inode. */
.destroy_inode = ntfs_destroy_big_inode, /* VFS: Deallocate inode. */
.put_inode = ntfs_put_inode, /* VFS: Called just before
@@ -2593,10 +2598,6 @@
kmem_cache_t *ntfs_attr_ctx_cache;
kmem_cache_t *ntfs_index_ctx_cache;

-/* A global default upcase table and a corresponding reference count. */
-ntfschar *default_upcase = NULL;
-unsigned long ntfs_nr_upcase_users = 0;
-
/* Driver wide semaphore. */
DECLARE_MUTEX(ntfs_lock);

--- linux-2.6.10-rc1-mm2-full/fs/ntfs/ntfs.h.old 2004-10-30 14:20:31.000000000 +0200
+++ linux-2.6.10-rc1-mm2-full/fs/ntfs/ntfs.h 2004-10-30 14:29:06.000000000 +0200
@@ -53,7 +53,6 @@
extern kmem_cache_t *ntfs_index_ctx_cache;

/* The various operations structs defined throughout the driver files. */
-extern struct super_operations ntfs_sops;
extern struct address_space_operations ntfs_aops;
extern struct address_space_operations ntfs_mst_aops;

@@ -86,8 +85,6 @@

/* From fs/ntfs/super.c */
#define default_upcase_len 0x10000
-extern ntfschar *default_upcase;
-extern unsigned long ntfs_nr_upcase_users;
extern struct semaphore ntfs_lock;

typedef struct {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.142 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site