diff options
Diffstat (limited to 'fs/ntfs/inode.c')
-rw-r--r-- | fs/ntfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index b24f4c4b2c5c..bda7a08911a5 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
@@ -2125,13 +2125,13 @@ void ntfs_put_inode(struct inode *vi) | |||
2125 | ntfs_inode *ni = NTFS_I(vi); | 2125 | ntfs_inode *ni = NTFS_I(vi); |
2126 | if (NInoIndexAllocPresent(ni)) { | 2126 | if (NInoIndexAllocPresent(ni)) { |
2127 | struct inode *bvi = NULL; | 2127 | struct inode *bvi = NULL; |
2128 | down(&vi->i_sem); | 2128 | mutex_lock(&vi->i_mutex); |
2129 | if (atomic_read(&vi->i_count) == 2) { | 2129 | if (atomic_read(&vi->i_count) == 2) { |
2130 | bvi = ni->itype.index.bmp_ino; | 2130 | bvi = ni->itype.index.bmp_ino; |
2131 | if (bvi) | 2131 | if (bvi) |
2132 | ni->itype.index.bmp_ino = NULL; | 2132 | ni->itype.index.bmp_ino = NULL; |
2133 | } | 2133 | } |
2134 | up(&vi->i_sem); | 2134 | mutex_unlock(&vi->i_mutex); |
2135 | if (bvi) | 2135 | if (bvi) |
2136 | iput(bvi); | 2136 | iput(bvi); |
2137 | } | 2137 | } |
@@ -2311,7 +2311,7 @@ static const char *es = " Leaving inconsistent metadata. Unmount and run " | |||
2311 | * | 2311 | * |
2312 | * Returns 0 on success or -errno on error. | 2312 | * Returns 0 on success or -errno on error. |
2313 | * | 2313 | * |
2314 | * Called with ->i_sem held. In all but one case ->i_alloc_sem is held for | 2314 | * Called with ->i_mutex held. In all but one case ->i_alloc_sem is held for |
2315 | * writing. The only case in the kernel where ->i_alloc_sem is not held is | 2315 | * writing. The only case in the kernel where ->i_alloc_sem is not held is |
2316 | * mm/filemap.c::generic_file_buffered_write() where vmtruncate() is called | 2316 | * mm/filemap.c::generic_file_buffered_write() where vmtruncate() is called |
2317 | * with the current i_size as the offset. The analogous place in NTFS is in | 2317 | * with the current i_size as the offset. The analogous place in NTFS is in |
@@ -2831,7 +2831,7 @@ void ntfs_truncate_vfs(struct inode *vi) { | |||
2831 | * We also abort all changes of user, group, and mode as we do not implement | 2831 | * We also abort all changes of user, group, and mode as we do not implement |
2832 | * the NTFS ACLs yet. | 2832 | * the NTFS ACLs yet. |
2833 | * | 2833 | * |
2834 | * Called with ->i_sem held. For the ATTR_SIZE (i.e. ->truncate) case, also | 2834 | * Called with ->i_mutex held. For the ATTR_SIZE (i.e. ->truncate) case, also |
2835 | * called with ->i_alloc_sem held for writing. | 2835 | * called with ->i_alloc_sem held for writing. |
2836 | * | 2836 | * |
2837 | * Basically this is a copy of generic notify_change() and inode_setattr() | 2837 | * Basically this is a copy of generic notify_change() and inode_setattr() |