aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ncp_fs_sb.h
diff options
context:
space:
mode:
authorPetr Vandrovec <petr@vandrovec.name>2010-09-26 19:47:33 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-04 15:10:52 -0400
commit2e54eb96e2c801f33d95b5dade15212ac4d6c4a5 (patch)
treec2996f29aa49881e93c7a37fad41e4961f6b8578 /include/linux/ncp_fs_sb.h
parent60056794127a25d641465b706e8828186f7a2e1f (diff)
BKL: Remove BKL from ncpfs
Dozen of changes in ncpfs to provide some locking other than BKL. In readdir cache unlock and mark complete first page as last operation, so it can be used for synchronization, as code intended. When updating dentry name on case insensitive filesystems do at least some basic locking... Hold i_mutex when updating inode fields. Push some ncp_conn_is_valid down to ncp_request. Connection can become invalid at any moment, and fewer error code paths to test the better. Use i_size_{read,write} to modify file size. Set inode's backing_dev_info as ncpfs has its own special bdi. In ioctl unbreak ioctls invoked on filesystem mounted 'ro' - tests are for inode writeable or owner match, but were turned to filesystem writeable and inode writeable or owner match. Also collect all permission checks in single place. Add some locking, and remove comments saying that it would be cool to add some locks to the code. Constify some pointers. Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/ncp_fs_sb.h')
-rw-r--r--include/linux/ncp_fs_sb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h
index 8da05bc098ca..d64b0e894336 100644
--- a/include/linux/ncp_fs_sb.h
+++ b/include/linux/ncp_fs_sb.h
@@ -62,6 +62,7 @@ struct ncp_server {
62 int ncp_reply_size; 62 int ncp_reply_size;
63 63
64 int root_setuped; 64 int root_setuped;
65 struct mutex root_setup_lock;
65 66
66 /* info for packet signing */ 67 /* info for packet signing */
67 int sign_wanted; /* 1=Server needs signed packets */ 68 int sign_wanted; /* 1=Server needs signed packets */
@@ -81,13 +82,14 @@ struct ncp_server {
81 size_t len; 82 size_t len;
82 void* data; 83 void* data;
83 } priv; 84 } priv;
85 struct rw_semaphore auth_rwsem;
84 86
85 /* nls info: codepage for volume and charset for I/O */ 87 /* nls info: codepage for volume and charset for I/O */
86 struct nls_table *nls_vol; 88 struct nls_table *nls_vol;
87 struct nls_table *nls_io; 89 struct nls_table *nls_io;
88 90
89 /* maximum age in jiffies */ 91 /* maximum age in jiffies */
90 int dentry_ttl; 92 atomic_t dentry_ttl;
91 93
92 /* miscellaneous */ 94 /* miscellaneous */
93 unsigned int flags; 95 unsigned int flags;