From: Mike Marciniszyn Date: Mon, 21 May 2012 13:30:40 +0000 (-0400) Subject: IB/qib: backport qib_fs.c to RHEL6.2 X-Git-Tag: vofed-3.5-x~87 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b3fff194cb976e7f4a18411192c8151077f4a5ea;p=~emulex%2Fcompat-rdma_3.12.git IB/qib: backport qib_fs.c to RHEL6.2 Signed-off-by: Mike Marciniszyn --- diff --git a/backports/2.6.32-EL6.2/23-qib_fs_RHEL6.2_backports.patch b/backports/2.6.32-EL6.2/23-qib_fs_RHEL6.2_backports.patch new file mode 100644 index 0000000..18dc17d --- /dev/null +++ b/backports/2.6.32-EL6.2/23-qib_fs_RHEL6.2_backports.patch @@ -0,0 +1,77 @@ +diff -rup a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c +--- a/drivers/infiniband/hw/qib/qib_fs.c 2012-05-21 10:14:13.000000000 -0400 ++++ b/drivers/infiniband/hw/qib/qib_fs.c 2012-05-21 10:51:08.000000000 -0400 +@@ -58,7 +58,9 @@ static int qibfs_mknod(struct inode *dir + goto bail; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)) + inode->i_ino = get_next_ino(); ++#endif + inode->i_mode = mode; + inode->i_uid = 0; + inode->i_gid = 0; +@@ -453,14 +455,27 @@ static int remove_file(struct dentry *pa + goto bail; + } + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)) ++ spin_lock(&dcache_lock); ++#endif + spin_lock(&tmp->d_lock); + if (!(d_unhashed(tmp) && tmp->d_inode)) { ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)) ++ dget_locked(tmp); ++#else + dget_dlock(tmp); ++#endif + __d_drop(tmp); + spin_unlock(&tmp->d_lock); ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)) ++ spin_unlock(&dcache_lock); ++#endif + simple_unlink(parent->d_inode, tmp); + } else { + spin_unlock(&tmp->d_lock); ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)) ++ spin_unlock(&dcache_lock); ++#endif + } + + ret = 0; +@@ -552,6 +567,7 @@ bail: + return ret; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)) + static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data) + { +@@ -559,6 +575,15 @@ static struct dentry *qibfs_mount(struct + ret = mount_single(fs_type, flags, data, qibfs_fill_super); + if (!IS_ERR(ret)) + qib_super = ret->d_sb; ++#else ++static struct dentry *qibfs_get_sb(struct file_system_type *fs_type, int flags, ++ const char *dev_name, void *data, struct vfsmount *mnt) ++{ ++ int ret = get_sb_single(fs_type, flags, data, ++ qibfs_fill_super, mnt); ++ if (ret >= 0) ++ qib_super = mnt->mnt_sb; ++#endif + return ret; + } + +@@ -600,7 +625,11 @@ int qibfs_remove(struct qib_devdata *dd) + static struct file_system_type qibfs_fs_type = { + .owner = THIS_MODULE, + .name = "ipathfs", ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)) + .mount = qibfs_mount, ++#else ++ .get_sb = qibfs_get_sb, ++#endif + .kill_sb = qibfs_kill_super, + }; +