diff options
Diffstat (limited to 'fs/coda')
| -rw-r--r-- | fs/coda/cache.c | 2 | ||||
| -rw-r--r-- | fs/coda/dir.c | 4 | ||||
| -rw-r--r-- | fs/coda/file.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/coda/cache.c b/fs/coda/cache.c index 80072fd9b7fa..c607d923350a 100644 --- a/fs/coda/cache.c +++ b/fs/coda/cache.c | |||
| @@ -93,7 +93,7 @@ static void coda_flag_children(struct dentry *parent, int flag) | |||
| 93 | spin_lock(&dcache_lock); | 93 | spin_lock(&dcache_lock); |
| 94 | list_for_each(child, &parent->d_subdirs) | 94 | list_for_each(child, &parent->d_subdirs) |
| 95 | { | 95 | { |
| 96 | de = list_entry(child, struct dentry, d_child); | 96 | de = list_entry(child, struct dentry, d_u.d_child); |
| 97 | /* don't know what to do with negative dentries */ | 97 | /* don't know what to do with negative dentries */ |
| 98 | if ( ! de->d_inode ) | 98 | if ( ! de->d_inode ) |
| 99 | continue; | 99 | continue; |
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 2391766e9c7c..8f1a517f8b4e 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
| @@ -453,7 +453,7 @@ int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir) | |||
| 453 | coda_vfs_stat.readdir++; | 453 | coda_vfs_stat.readdir++; |
| 454 | 454 | ||
| 455 | host_inode = host_file->f_dentry->d_inode; | 455 | host_inode = host_file->f_dentry->d_inode; |
| 456 | down(&host_inode->i_sem); | 456 | mutex_lock(&host_inode->i_mutex); |
| 457 | host_file->f_pos = coda_file->f_pos; | 457 | host_file->f_pos = coda_file->f_pos; |
| 458 | 458 | ||
| 459 | if (!host_file->f_op->readdir) { | 459 | if (!host_file->f_op->readdir) { |
| @@ -475,7 +475,7 @@ int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir) | |||
| 475 | } | 475 | } |
| 476 | out: | 476 | out: |
| 477 | coda_file->f_pos = host_file->f_pos; | 477 | coda_file->f_pos = host_file->f_pos; |
| 478 | up(&host_inode->i_sem); | 478 | mutex_unlock(&host_inode->i_mutex); |
| 479 | 479 | ||
| 480 | return ret; | 480 | return ret; |
| 481 | } | 481 | } |
diff --git a/fs/coda/file.c b/fs/coda/file.c index e6bc022568f3..30b4630bd735 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c | |||
| @@ -77,14 +77,14 @@ coda_file_write(struct file *coda_file, const char __user *buf, size_t count, lo | |||
| 77 | return -EINVAL; | 77 | return -EINVAL; |
| 78 | 78 | ||
| 79 | host_inode = host_file->f_dentry->d_inode; | 79 | host_inode = host_file->f_dentry->d_inode; |
| 80 | down(&coda_inode->i_sem); | 80 | mutex_lock(&coda_inode->i_mutex); |
| 81 | 81 | ||
| 82 | ret = host_file->f_op->write(host_file, buf, count, ppos); | 82 | ret = host_file->f_op->write(host_file, buf, count, ppos); |
| 83 | 83 | ||
| 84 | coda_inode->i_size = host_inode->i_size; | 84 | coda_inode->i_size = host_inode->i_size; |
| 85 | coda_inode->i_blocks = (coda_inode->i_size + 511) >> 9; | 85 | coda_inode->i_blocks = (coda_inode->i_size + 511) >> 9; |
| 86 | coda_inode->i_mtime = coda_inode->i_ctime = CURRENT_TIME_SEC; | 86 | coda_inode->i_mtime = coda_inode->i_ctime = CURRENT_TIME_SEC; |
| 87 | up(&coda_inode->i_sem); | 87 | mutex_unlock(&coda_inode->i_mutex); |
| 88 | 88 | ||
| 89 | return ret; | 89 | return ret; |
| 90 | } | 90 | } |
| @@ -272,9 +272,9 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) | |||
| 272 | if (host_file->f_op && host_file->f_op->fsync) { | 272 | if (host_file->f_op && host_file->f_op->fsync) { |
| 273 | host_dentry = host_file->f_dentry; | 273 | host_dentry = host_file->f_dentry; |
| 274 | host_inode = host_dentry->d_inode; | 274 | host_inode = host_dentry->d_inode; |
| 275 | down(&host_inode->i_sem); | 275 | mutex_lock(&host_inode->i_mutex); |
| 276 | err = host_file->f_op->fsync(host_file, host_dentry, datasync); | 276 | err = host_file->f_op->fsync(host_file, host_dentry, datasync); |
| 277 | up(&host_inode->i_sem); | 277 | mutex_unlock(&host_inode->i_mutex); |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | if ( !err && !datasync ) { | 280 | if ( !err && !datasync ) { |
