.. | .. |
---|
43 | 43 | */ |
---|
44 | 44 | struct affs_inode_info { |
---|
45 | 45 | atomic_t i_opencnt; |
---|
46 | | - struct semaphore i_link_lock; /* Protects internal inode access. */ |
---|
47 | | - struct semaphore i_ext_lock; /* Protects internal inode access. */ |
---|
| 46 | + struct mutex i_link_lock; /* Protects internal inode access. */ |
---|
| 47 | + struct mutex i_ext_lock; /* Protects internal inode access. */ |
---|
48 | 48 | #define i_hash_lock i_ext_lock |
---|
49 | 49 | u32 i_blkcnt; /* block count */ |
---|
50 | 50 | u32 i_extcnt; /* extended block count */ |
---|
.. | .. |
---|
293 | 293 | static inline void |
---|
294 | 294 | affs_lock_link(struct inode *inode) |
---|
295 | 295 | { |
---|
296 | | - down(&AFFS_I(inode)->i_link_lock); |
---|
| 296 | + mutex_lock(&AFFS_I(inode)->i_link_lock); |
---|
297 | 297 | } |
---|
298 | 298 | static inline void |
---|
299 | 299 | affs_unlock_link(struct inode *inode) |
---|
300 | 300 | { |
---|
301 | | - up(&AFFS_I(inode)->i_link_lock); |
---|
| 301 | + mutex_unlock(&AFFS_I(inode)->i_link_lock); |
---|
302 | 302 | } |
---|
303 | 303 | static inline void |
---|
304 | 304 | affs_lock_dir(struct inode *inode) |
---|
305 | 305 | { |
---|
306 | | - down(&AFFS_I(inode)->i_hash_lock); |
---|
| 306 | + mutex_lock_nested(&AFFS_I(inode)->i_hash_lock, SINGLE_DEPTH_NESTING); |
---|
307 | 307 | } |
---|
308 | 308 | static inline void |
---|
309 | 309 | affs_unlock_dir(struct inode *inode) |
---|
310 | 310 | { |
---|
311 | | - up(&AFFS_I(inode)->i_hash_lock); |
---|
| 311 | + mutex_unlock(&AFFS_I(inode)->i_hash_lock); |
---|
312 | 312 | } |
---|
313 | 313 | static inline void |
---|
314 | 314 | affs_lock_ext(struct inode *inode) |
---|
315 | 315 | { |
---|
316 | | - down(&AFFS_I(inode)->i_ext_lock); |
---|
| 316 | + mutex_lock(&AFFS_I(inode)->i_ext_lock); |
---|
317 | 317 | } |
---|
318 | 318 | static inline void |
---|
319 | 319 | affs_unlock_ext(struct inode *inode) |
---|
320 | 320 | { |
---|
321 | | - up(&AFFS_I(inode)->i_ext_lock); |
---|
| 321 | + mutex_unlock(&AFFS_I(inode)->i_ext_lock); |
---|
322 | 322 | } |
---|