diff options
author | Petr Vandrovec <petr@vandrovec.name> | 2010-09-26 19:47:33 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-04 15:10:52 -0400 |
commit | 2e54eb96e2c801f33d95b5dade15212ac4d6c4a5 (patch) | |
tree | c2996f29aa49881e93c7a37fad41e4961f6b8578 /include/linux/ncp_fs.h | |
parent | 60056794127a25d641465b706e8828186f7a2e1f (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.h')
-rw-r--r-- | include/linux/ncp_fs.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 4522aed00906..ef663061d5ac 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -241,34 +241,6 @@ int ncp_mmap(struct file *, struct vm_area_struct *); | |||
241 | /* linux/fs/ncpfs/ncplib_kernel.c */ | 241 | /* linux/fs/ncpfs/ncplib_kernel.c */ |
242 | int ncp_make_closed(struct inode *); | 242 | int ncp_make_closed(struct inode *); |
243 | 243 | ||
244 | #define ncp_namespace(i) (NCP_SERVER(i)->name_space[NCP_FINFO(i)->volNumber]) | ||
245 | |||
246 | static inline int ncp_preserve_entry_case(struct inode *i, __u32 nscreator) | ||
247 | { | ||
248 | #ifdef CONFIG_NCPFS_SMALLDOS | ||
249 | int ns = ncp_namespace(i); | ||
250 | |||
251 | if ((ns == NW_NS_DOS) | ||
252 | #ifdef CONFIG_NCPFS_OS2_NS | ||
253 | || ((ns == NW_NS_OS2) && (nscreator == NW_NS_DOS)) | ||
254 | #endif /* CONFIG_NCPFS_OS2_NS */ | ||
255 | ) | ||
256 | return 0; | ||
257 | #endif /* CONFIG_NCPFS_SMALLDOS */ | ||
258 | return 1; | ||
259 | } | ||
260 | |||
261 | #define ncp_preserve_case(i) (ncp_namespace(i) != NW_NS_DOS) | ||
262 | |||
263 | static inline int ncp_case_sensitive(struct inode *i) | ||
264 | { | ||
265 | #ifdef CONFIG_NCPFS_NFS_NS | ||
266 | return ncp_namespace(i) == NW_NS_NFS; | ||
267 | #else | ||
268 | return 0; | ||
269 | #endif /* CONFIG_NCPFS_NFS_NS */ | ||
270 | } | ||
271 | |||
272 | #endif /* __KERNEL__ */ | 244 | #endif /* __KERNEL__ */ |
273 | 245 | ||
274 | #endif /* _LINUX_NCP_FS_H */ | 246 | #endif /* _LINUX_NCP_FS_H */ |