aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_fs.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 9f989c0ba9d3..df7fa251dcdc 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -58,6 +58,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
58 goto bail; 58 goto bail;
59 } 59 }
60 60
61 inode->i_ino = get_next_ino();
61 inode->i_mode = mode; 62 inode->i_mode = mode;
62 inode->i_uid = 0; 63 inode->i_uid = 0;
63 inode->i_gid = 0; 64 inode->i_gid = 0;
@@ -367,6 +368,7 @@ bail:
367static const struct file_operations flash_ops = { 368static const struct file_operations flash_ops = {
368 .read = flash_read, 369 .read = flash_read,
369 .write = flash_write, 370 .write = flash_write,
371 .llseek = default_llseek,
370}; 372};
371 373
372static int add_cntr_files(struct super_block *sb, struct qib_devdata *dd) 374static int add_cntr_files(struct super_block *sb, struct qib_devdata *dd)
@@ -451,17 +453,14 @@ static int remove_file(struct dentry *parent, char *name)
451 goto bail; 453 goto bail;
452 } 454 }
453 455
454 spin_lock(&dcache_lock);
455 spin_lock(&tmp->d_lock); 456 spin_lock(&tmp->d_lock);
456 if (!(d_unhashed(tmp) && tmp->d_inode)) { 457 if (!(d_unhashed(tmp) && tmp->d_inode)) {
457 dget_locked(tmp); 458 dget_dlock(tmp);
458 __d_drop(tmp); 459 __d_drop(tmp);
459 spin_unlock(&tmp->d_lock); 460 spin_unlock(&tmp->d_lock);
460 spin_unlock(&dcache_lock);
461 simple_unlink(parent->d_inode, tmp); 461 simple_unlink(parent->d_inode, tmp);
462 } else { 462 } else {
463 spin_unlock(&tmp->d_lock); 463 spin_unlock(&tmp->d_lock);
464 spin_unlock(&dcache_lock);
465 } 464 }
466 465
467 ret = 0; 466 ret = 0;
@@ -553,13 +552,13 @@ bail:
553 return ret; 552 return ret;
554} 553}
555 554
556static int qibfs_get_sb(struct file_system_type *fs_type, int flags, 555static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags,
557 const char *dev_name, void *data, struct vfsmount *mnt) 556 const char *dev_name, void *data)
558{ 557{
559 int ret = get_sb_single(fs_type, flags, data, 558 struct dentry *ret;
560 qibfs_fill_super, mnt); 559 ret = mount_single(fs_type, flags, data, qibfs_fill_super);
561 if (ret >= 0) 560 if (!IS_ERR(ret))
562 qib_super = mnt->mnt_sb; 561 qib_super = ret->d_sb;
563 return ret; 562 return ret;
564} 563}
565 564
@@ -601,7 +600,7 @@ int qibfs_remove(struct qib_devdata *dd)
601static struct file_system_type qibfs_fs_type = { 600static struct file_system_type qibfs_fs_type = {
602 .owner = THIS_MODULE, 601 .owner = THIS_MODULE,
603 .name = "ipathfs", 602 .name = "ipathfs",
604 .get_sb = qibfs_get_sb, 603 .mount = qibfs_mount,
605 .kill_sb = qibfs_kill_super, 604 .kill_sb = qibfs_kill_super,
606}; 605};
607 606