diff options
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 9c50523382e7..63c020e6589e 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -74,7 +74,7 @@ int dcache_dir_close(struct inode *inode, struct file *file) | |||
74 | 74 | ||
75 | loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) | 75 | loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) |
76 | { | 76 | { |
77 | down(&file->f_dentry->d_inode->i_sem); | 77 | mutex_lock(&file->f_dentry->d_inode->i_mutex); |
78 | switch (origin) { | 78 | switch (origin) { |
79 | case 1: | 79 | case 1: |
80 | offset += file->f_pos; | 80 | offset += file->f_pos; |
@@ -82,7 +82,7 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) | |||
82 | if (offset >= 0) | 82 | if (offset >= 0) |
83 | break; | 83 | break; |
84 | default: | 84 | default: |
85 | up(&file->f_dentry->d_inode->i_sem); | 85 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); |
86 | return -EINVAL; | 86 | return -EINVAL; |
87 | } | 87 | } |
88 | if (offset != file->f_pos) { | 88 | if (offset != file->f_pos) { |
@@ -106,7 +106,7 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) | |||
106 | spin_unlock(&dcache_lock); | 106 | spin_unlock(&dcache_lock); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | up(&file->f_dentry->d_inode->i_sem); | 109 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); |
110 | return offset; | 110 | return offset; |
111 | } | 111 | } |
112 | 112 | ||
@@ -356,7 +356,7 @@ int simple_commit_write(struct file *file, struct page *page, | |||
356 | 356 | ||
357 | /* | 357 | /* |
358 | * No need to use i_size_read() here, the i_size | 358 | * No need to use i_size_read() here, the i_size |
359 | * cannot change under us because we hold the i_sem. | 359 | * cannot change under us because we hold the i_mutex. |
360 | */ | 360 | */ |
361 | if (pos > inode->i_size) | 361 | if (pos > inode->i_size) |
362 | i_size_write(inode, pos); | 362 | i_size_write(inode, pos); |