diff options
Diffstat (limited to 'fs/ntfs/ntfs.h')
-rw-r--r-- | fs/ntfs/ntfs.h | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/fs/ntfs/ntfs.h b/fs/ntfs/ntfs.h index 653d2a5c4899..bf7b3d7c0930 100644 --- a/fs/ntfs/ntfs.h +++ b/fs/ntfs/ntfs.h | |||
@@ -60,13 +60,13 @@ extern struct kmem_cache *ntfs_index_ctx_cache; | |||
60 | extern struct address_space_operations ntfs_aops; | 60 | extern struct address_space_operations ntfs_aops; |
61 | extern struct address_space_operations ntfs_mst_aops; | 61 | extern struct address_space_operations ntfs_mst_aops; |
62 | 62 | ||
63 | extern struct file_operations ntfs_file_ops; | 63 | extern const struct file_operations ntfs_file_ops; |
64 | extern struct inode_operations ntfs_file_inode_ops; | 64 | extern struct inode_operations ntfs_file_inode_ops; |
65 | 65 | ||
66 | extern struct file_operations ntfs_dir_ops; | 66 | extern const struct file_operations ntfs_dir_ops; |
67 | extern struct inode_operations ntfs_dir_inode_ops; | 67 | extern struct inode_operations ntfs_dir_inode_ops; |
68 | 68 | ||
69 | extern struct file_operations ntfs_empty_file_ops; | 69 | extern const struct file_operations ntfs_empty_file_ops; |
70 | extern struct inode_operations ntfs_empty_inode_ops; | 70 | extern struct inode_operations ntfs_empty_inode_ops; |
71 | 71 | ||
72 | extern struct export_operations ntfs_export_ops; | 72 | extern struct export_operations ntfs_export_ops; |
@@ -91,7 +91,7 @@ extern void free_compression_buffers(void); | |||
91 | 91 | ||
92 | /* From fs/ntfs/super.c */ | 92 | /* From fs/ntfs/super.c */ |
93 | #define default_upcase_len 0x10000 | 93 | #define default_upcase_len 0x10000 |
94 | extern struct semaphore ntfs_lock; | 94 | extern struct mutex ntfs_lock; |
95 | 95 | ||
96 | typedef struct { | 96 | typedef struct { |
97 | int val; | 97 | int val; |
@@ -132,4 +132,33 @@ extern int ntfs_ucstonls(const ntfs_volume *vol, const ntfschar *ins, | |||
132 | /* From fs/ntfs/upcase.c */ | 132 | /* From fs/ntfs/upcase.c */ |
133 | extern ntfschar *generate_default_upcase(void); | 133 | extern ntfschar *generate_default_upcase(void); |
134 | 134 | ||
135 | static inline int ntfs_ffs(int x) | ||
136 | { | ||
137 | int r = 1; | ||
138 | |||
139 | if (!x) | ||
140 | return 0; | ||
141 | if (!(x & 0xffff)) { | ||
142 | x >>= 16; | ||
143 | r += 16; | ||
144 | } | ||
145 | if (!(x & 0xff)) { | ||
146 | x >>= 8; | ||
147 | r += 8; | ||
148 | } | ||
149 | if (!(x & 0xf)) { | ||
150 | x >>= 4; | ||
151 | r += 4; | ||
152 | } | ||
153 | if (!(x & 3)) { | ||
154 | x >>= 2; | ||
155 | r += 2; | ||
156 | } | ||
157 | if (!(x & 1)) { | ||
158 | x >>= 1; | ||
159 | r += 1; | ||
160 | } | ||
161 | return r; | ||
162 | } | ||
163 | |||
135 | #endif /* _LINUX_NTFS_H */ | 164 | #endif /* _LINUX_NTFS_H */ |