Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 304682 Details for
Bug 445412
clean up CIFS build warnings
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- clean up build warnings (take #2)
0001-BZ-445412-CIFS-clean-up-build-warnings.patch (text/plain), 10.13 KB, created by
Jeff Layton
on 2008-05-06 20:19:36 UTC
(
hide
)
Description:
patch -- clean up build warnings (take #2)
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2008-05-06 20:19:36 UTC
Size:
10.13 KB
patch
obsolete
>From 524891d8381e8a27b6e9ca73eea85b8d4f764b04 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Tue, 6 May 2008 16:17:41 -0400 >Subject: [PATCH] BZ#445412: [CIFS] clean up build warnings > >The recent backported CIFS code throws a lot of build warnings. Clean >them up so that real problems are more readily visible. >--- > fs/cifs/cifsfs.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- > fs/cifs/cifsfs.h | 25 +++++++++++++++++++++++++ > fs/cifs/connect.c | 6 +++--- > fs/cifs/file.c | 10 ++++++++-- > fs/cifs/netmisc.c | 2 ++ > 5 files changed, 81 insertions(+), 15 deletions(-) > >diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c >index d023ade..8fa3da8 100644 >--- a/fs/cifs/cifsfs.c >+++ b/fs/cifs/cifsfs.c >@@ -73,7 +73,11 @@ extern struct task_struct *oplockThread; /* remove sparse warning */ > struct task_struct *oplockThread = NULL; > /* extern struct task_struct * dnotifyThread; remove sparse warning */ > static struct task_struct *dnotifyThread = NULL; >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) > static const struct super_operations cifs_super_ops; >+#else >+static struct super_operations cifs_super_ops; >+#endif > unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; > module_param(CIFSMaxBufSize, int, 0); > MODULE_PARM_DESC(CIFSMaxBufSize, "Network buffer size (not including header). " >@@ -528,7 +532,11 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data) > return 0; > } > >-static const struct super_operations cifs_super_ops = { >+static >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct super_operations cifs_super_ops = { > .read_inode = cifs_read_inode, > .put_super = cifs_put_super, > .statfs = cifs_statfs, >@@ -660,7 +668,11 @@ static struct file_system_type cifs_fs_type = { > .kill_sb = kill_anon_super, > /* .fs_flags */ > }; >-const struct inode_operations cifs_dir_inode_ops = { >+ >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct inode_operations cifs_dir_inode_ops = { > .create = cifs_create, > .lookup = cifs_lookup, > .getattr = cifs_getattr, >@@ -682,7 +694,10 @@ const struct inode_operations cifs_dir_inode_ops = { > #endif > }; > >-const struct inode_operations cifs_file_inode_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct inode_operations cifs_file_inode_ops = { > /* revalidate:cifs_revalidate, */ > .setattr = cifs_setattr, > .getattr = cifs_getattr, /* do we need this anymore? */ >@@ -696,7 +711,10 @@ const struct inode_operations cifs_file_inode_ops = { > #endif > }; > >-const struct inode_operations cifs_symlink_inode_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct inode_operations cifs_symlink_inode_ops = { > #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) > .readlink = cifs_readlink, > #else >@@ -716,7 +734,10 @@ const struct inode_operations cifs_symlink_inode_ops = { > #endif > }; > >-const struct file_operations cifs_file_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct file_operations cifs_file_ops = { > .read = do_sync_read, > .write = do_sync_write, > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) >@@ -746,7 +767,10 @@ const struct file_operations cifs_file_ops = { > #endif /* CONFIG_CIFS_EXPERIMENTAL */ > }; > >-const struct file_operations cifs_file_direct_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct file_operations cifs_file_direct_ops = { > /* no mmap, no aio, no readv - > BB reevaluate whether they can be done with directio, no cache */ > .read = cifs_user_read, >@@ -769,7 +793,10 @@ const struct file_operations cifs_file_direct_ops = { > .dir_notify = cifs_dir_notify, > #endif /* CONFIG_CIFS_EXPERIMENTAL */ > }; >-const struct file_operations cifs_file_nobrl_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct file_operations cifs_file_nobrl_ops = { > .read = do_sync_read, > .write = do_sync_write, > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) >@@ -798,7 +825,10 @@ const struct file_operations cifs_file_nobrl_ops = { > #endif /* CONFIG_CIFS_EXPERIMENTAL */ > }; > >-const struct file_operations cifs_file_direct_nobrl_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct file_operations cifs_file_direct_nobrl_ops = { > /* no mmap, no aio, no readv - > BB reevaluate whether they can be done with directio, no cache */ > .read = cifs_user_read, >@@ -820,8 +850,11 @@ const struct file_operations cifs_file_direct_nobrl_ops = { > .dir_notify = cifs_dir_notify, > #endif /* CONFIG_CIFS_EXPERIMENTAL */ > }; >- >-const struct file_operations cifs_dir_ops = { >+ >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct file_operations cifs_dir_ops = { > .readdir = cifs_readdir, > .release = cifs_closedir, > .read = generic_read_dir, >diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h >index c6d2dea..839f003 100644 >--- a/fs/cifs/cifsfs.h >+++ b/fs/cifs/cifsfs.h >@@ -77,8 +77,13 @@ static inline int cifs_filemap_write_and_wait(struct address_space *mapping) > #define cifs_filemap_write_and_wait(x) filemap_write_and_wait(x) > #endif > >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) > extern const struct address_space_operations cifs_addr_ops; > extern const struct address_space_operations cifs_addr_ops_smallbuf; >+#else >+extern struct address_space_operations cifs_addr_ops; >+extern struct address_space_operations cifs_addr_ops_smallbuf; >+#endif > > /* Functions related to super block operations */ > /* extern const struct super_operations cifs_super_ops;*/ >@@ -87,7 +92,11 @@ extern void cifs_read_inode(struct inode *); > /* extern void cifs_write_inode(struct inode *); */ /* BB not needed yet */ > > /* Functions related to inodes */ >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) > extern const struct inode_operations cifs_dir_inode_ops; >+#else >+extern struct inode_operations cifs_dir_inode_ops; >+#endif > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) > extern int cifs_create(struct inode *, struct dentry *, int, > struct nameidata *); >@@ -109,14 +118,26 @@ extern int cifs_rename(struct inode *, struct dentry *, struct inode *, > extern int cifs_revalidate(struct dentry *); > extern int cifs_setattr(struct dentry *, struct iattr *); > >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) > extern const struct inode_operations cifs_file_inode_ops; > extern const struct inode_operations cifs_symlink_inode_ops; >+#else >+extern struct inode_operations cifs_file_inode_ops; >+extern struct inode_operations cifs_symlink_inode_ops; >+#endif > > /* Functions related to files and directories */ >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) > extern const struct file_operations cifs_file_ops; > extern const struct file_operations cifs_file_direct_ops; /* if directio mnt */ > extern const struct file_operations cifs_file_nobrl_ops; > extern const struct file_operations cifs_file_direct_nobrl_ops; /* no brlocks */ >+#else >+extern struct file_operations cifs_file_ops; >+extern struct file_operations cifs_file_direct_ops; /* if directio mnt */ >+extern struct file_operations cifs_file_nobrl_ops; >+extern struct file_operations cifs_file_direct_nobrl_ops; /* no brlocks */ >+#endif > extern int cifs_open(struct inode *inode, struct file *file); > extern int cifs_close(struct inode *inode, struct file *file); > extern int cifs_closedir(struct inode *inode, struct file *file); >@@ -132,7 +153,11 @@ extern int cifs_flush(struct file *, fl_owner_t id); > extern int cifs_flush(struct file *); > #endif /* 2.6.17 */ > extern int cifs_file_mmap(struct file * , struct vm_area_struct *); >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) > extern const struct file_operations cifs_dir_ops; >+#else >+extern struct file_operations cifs_dir_ops; >+#endif > extern int cifs_dir_open(struct inode *inode, struct file *file); > extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir); > extern int cifs_dir_notify(struct file *, unsigned long arg); >diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c >index 53f3db8..e5fb205 100644 >--- a/fs/cifs/connect.c >+++ b/fs/cifs/connect.c >@@ -1850,16 +1850,16 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, > cFYI(1, ("very large write cap")); > #endif /* CIFS_DEBUG2 */ > if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { >- if (vol_info == NULL) >+ if (vol_info == NULL) { > cFYI(1, ("resetting capabilities failed")); >- else >+ } else { > cERROR(1, ("Negotiating Unix capabilities " > "with the server failed. Consider " > "mounting with the Unix Extensions\n" > "disabled, if problems are found, " > "by specifying the nounix mount " > "option.")); >- >+ } > } > } > } >diff --git a/fs/cifs/file.c b/fs/cifs/file.c >index cce611a..da93580 100644 >--- a/fs/cifs/file.c >+++ b/fs/cifs/file.c >@@ -2322,7 +2322,10 @@ static int cifs_prepare_write(struct file *file, struct page *page, > return 0; > } > >-const struct address_space_operations cifs_addr_ops = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct address_space_operations cifs_addr_ops = { > .readpage = cifs_readpage, > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) > .readpages = cifs_readpages, >@@ -2345,7 +2348,10 @@ const struct address_space_operations cifs_addr_ops = { > * contain the header plus one complete page of data. Otherwise, we need > * to leave cifs_readpages out of the address space operations. > */ >-const struct address_space_operations cifs_addr_ops_smallbuf = { >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) >+const >+#endif >+struct address_space_operations cifs_addr_ops_smallbuf = { > .readpage = cifs_readpage, > .writepage = cifs_writepage, > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 14) >diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c >index 173ed1c..82a4072 100644 >--- a/fs/cifs/netmisc.c >+++ b/fs/cifs/netmisc.c >@@ -133,6 +133,7 @@ static const struct smb_to_posix_error mapping_table_ERRHRD[] = { > }; > > >+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19) > /* if the mount helper is missing we need to reverse the 1st slash > from '/' to backslash in order to format the UNC properly for > ip address parsing and for tree connect (unless the user >@@ -159,6 +160,7 @@ static int canonicalize_unc(char *cp) > } > return 0; > } >+#endif > > /* Convert string containing dotted ip address to binary form */ > /* returns 0 if invalid address */ >-- >1.5.3.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 445412
:
304679
| 304682