aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_fs.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index 2fca70836dae..31ae1b108aea 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -57,6 +57,7 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
57 goto bail; 57 goto bail;
58 } 58 }
59 59
60 inode->i_ino = get_next_ino();
60 inode->i_mode = mode; 61 inode->i_mode = mode;
61 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 62 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
62 inode->i_private = data; 63 inode->i_private = data;
@@ -103,6 +104,7 @@ static ssize_t atomic_stats_read(struct file *file, char __user *buf,
103 104
104static const struct file_operations atomic_stats_ops = { 105static const struct file_operations atomic_stats_ops = {
105 .read = atomic_stats_read, 106 .read = atomic_stats_read,
107 .llseek = default_llseek,
106}; 108};
107 109
108static ssize_t atomic_counters_read(struct file *file, char __user *buf, 110static ssize_t atomic_counters_read(struct file *file, char __user *buf,
@@ -120,6 +122,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
120 122
121static const struct file_operations atomic_counters_ops = { 123static const struct file_operations atomic_counters_ops = {
122 .read = atomic_counters_read, 124 .read = atomic_counters_read,
125 .llseek = default_llseek,
123}; 126};
124 127
125static ssize_t flash_read(struct file *file, char __user *buf, 128static ssize_t flash_read(struct file *file, char __user *buf,
@@ -224,6 +227,7 @@ bail:
224static const struct file_operations flash_ops = { 227static const struct file_operations flash_ops = {
225 .read = flash_read, 228 .read = flash_read,
226 .write = flash_write, 229 .write = flash_write,
230 .llseek = default_llseek,
227}; 231};
228 232
229static int create_device_files(struct super_block *sb, 233static int create_device_files(struct super_block *sb,
@@ -273,18 +277,14 @@ static int remove_file(struct dentry *parent, char *name)
273 goto bail; 277 goto bail;
274 } 278 }
275 279
276 spin_lock(&dcache_lock);
277 spin_lock(&tmp->d_lock); 280 spin_lock(&tmp->d_lock);
278 if (!(d_unhashed(tmp) && tmp->d_inode)) { 281 if (!(d_unhashed(tmp) && tmp->d_inode)) {
279 dget_locked(tmp); 282 dget_dlock(tmp);
280 __d_drop(tmp); 283 __d_drop(tmp);
281 spin_unlock(&tmp->d_lock); 284 spin_unlock(&tmp->d_lock);
282 spin_unlock(&dcache_lock);
283 simple_unlink(parent->d_inode, tmp); 285 simple_unlink(parent->d_inode, tmp);
284 } else { 286 } else
285 spin_unlock(&tmp->d_lock); 287 spin_unlock(&tmp->d_lock);
286 spin_unlock(&dcache_lock);
287 }
288 288
289 ret = 0; 289 ret = 0;
290bail: 290bail:
@@ -358,13 +358,13 @@ bail:
358 return ret; 358 return ret;
359} 359}
360 360
361static int ipathfs_get_sb(struct file_system_type *fs_type, int flags, 361static struct dentry *ipathfs_mount(struct file_system_type *fs_type,
362 const char *dev_name, void *data, struct vfsmount *mnt) 362 int flags, const char *dev_name, void *data)
363{ 363{
364 int ret = get_sb_single(fs_type, flags, data, 364 struct dentry *ret;
365 ipathfs_fill_super, mnt); 365 ret = mount_single(fs_type, flags, data, ipathfs_fill_super);
366 if (ret >= 0) 366 if (!IS_ERR(ret))
367 ipath_super = mnt->mnt_sb; 367 ipath_super = ret->d_sb;
368 return ret; 368 return ret;
369} 369}
370 370
@@ -407,7 +407,7 @@ bail:
407static struct file_system_type ipathfs_fs_type = { 407static struct file_system_type ipathfs_fs_type = {
408 .owner = THIS_MODULE, 408 .owner = THIS_MODULE,
409 .name = "ipathfs", 409 .name = "ipathfs",
410 .get_sb = ipathfs_get_sb, 410 .mount = ipathfs_mount,
411 .kill_sb = ipathfs_kill_super, 411 .kill_sb = ipathfs_kill_super,
412}; 412};
413 413