Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
a6eb2d14
Commit
a6eb2d14
authored
Mar 03, 2017
by
Konstantin Artyushkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build for CentOS 7 with 3.10.0-514.* kernel
parent
1e96e38f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
connect.c
sources/centos70/connect.c
+7
-0
file.c
sources/centos70/file.c
+7
-1
inode.c
sources/centos70/inode.c
+8
-1
misc.c
sources/centos70/misc.c
+7
-0
No files found.
sources/centos70/connect.c
View file @
a6eb2d14
...
...
@@ -18,6 +18,7 @@
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <generated/uapi/linux/version.h>
#include <linux/fs.h>
#include <linux/net.h>
#include <linux/string.h>
...
...
@@ -3939,12 +3940,14 @@ cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb)
return
tlink_tcon
(
cifs_sb_master_tlink
(
cifs_sb
));
}
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) < 1795)
static
int
cifs_sb_tcon_pending_wait
(
void
*
unused
)
{
schedule
();
return
signal_pending
(
current
)
?
-
ERESTARTSYS
:
0
;
}
#endif
/* find and return a tlink with given uid */
static
struct
tcon_link
*
...
...
@@ -4043,9 +4046,13 @@ cifs_sb_tlink(struct cifs_sb_info *cifs_sb)
spin_unlock
(
&
cifs_sb
->
tlink_tree_lock
);
}
else
{
wait_for_construction:
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) >= 1795)
ret
=
wait_on_bit
(
&
tlink
->
tl_flags
,
TCON_LINK_PENDING
,
TASK_INTERRUPTIBLE
);
#else
ret
=
wait_on_bit
(
&
tlink
->
tl_flags
,
TCON_LINK_PENDING
,
cifs_sb_tcon_pending_wait
,
TASK_INTERRUPTIBLE
);
#endif
if
(
ret
)
{
cifs_put_tlink
(
tlink
);
return
ERR_PTR
(
ret
);
...
...
sources/centos70/file.c
View file @
a6eb2d14
...
...
@@ -21,6 +21,7 @@
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <generated/uapi/linux/version.h>
#include <linux/fs.h>
#include <linux/backing-dev.h>
#include <linux/stat.h>
...
...
@@ -3679,12 +3680,14 @@ static int cifs_launder_page(struct page *page)
return
rc
;
}
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) < 1795)
static
int
cifs_pending_writers_wait
(
void
*
unused
)
{
schedule
();
return
0
;
}
#endif
void
cifs_oplock_break
(
struct
work_struct
*
work
)
{
...
...
@@ -3696,9 +3699,12 @@ void cifs_oplock_break(struct work_struct *work)
struct
TCP_Server_Info
*
server
=
tcon
->
ses
->
server
;
int
rc
=
0
;
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) >= 1795)
wait_on_bit
(
&
cinode
->
flags
,
CIFS_INODE_PENDING_WRITERS
,
TASK_UNINTERRUPTIBLE
);
#else
wait_on_bit
(
&
cinode
->
flags
,
CIFS_INODE_PENDING_WRITERS
,
cifs_pending_writers_wait
,
TASK_UNINTERRUPTIBLE
);
#endif
server
->
ops
->
downgrade_oplock
(
server
,
cinode
,
test_bit
(
CIFS_INODE_DOWNGRADE_OPLOCK_TO_L2
,
&
cinode
->
flags
));
...
...
sources/centos70/inode.c
View file @
a6eb2d14
...
...
@@ -18,6 +18,7 @@
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <generated/uapi/linux/version.h>
#include <linux/fs.h>
#include <linux/stat.h>
#include <linux/slab.h>
...
...
@@ -1791,6 +1792,7 @@ cifs_invalidate_mapping(struct inode *inode)
return
rc
;
}
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) < 1795)
/**
* cifs_wait_bit_killable - helper for functions that are sleeping on bit locks
* @word: long word containing the bit lock
...
...
@@ -1803,6 +1805,7 @@ cifs_wait_bit_killable(void *word)
freezable_schedule_unsafe
();
return
0
;
}
#endif
int
cifs_revalidate_mapping
(
struct
inode
*
inode
)
...
...
@@ -1810,8 +1813,12 @@ cifs_revalidate_mapping(struct inode *inode)
int
rc
;
unsigned
long
*
flags
=
&
CIFS_I
(
inode
)
->
flags
;
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) >= 1795)
rc
=
wait_on_bit_lock
(
flags
,
CIFS_INO_LOCK
,
TASK_KILLABLE
);
#else
rc
=
wait_on_bit_lock
(
flags
,
CIFS_INO_LOCK
,
cifs_wait_bit_killable
,
TASK_KILLABLE
);
TASK_KILLABLE
);
#endif
if
(
rc
)
return
rc
;
...
...
sources/centos70/misc.c
View file @
a6eb2d14
...
...
@@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <generated/uapi/linux/version.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/mempool.h>
...
...
@@ -565,12 +566,14 @@ void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock)
cinode
->
oplock
=
0
;
}
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) < 1795)
static
int
cifs_oplock_break_wait
(
void
*
unused
)
{
schedule
();
return
signal_pending
(
current
)
?
-
ERESTARTSYS
:
0
;
}
#endif
/*
* We wait for oplock breaks to be processed before we attempt to perform
...
...
@@ -581,8 +584,12 @@ int cifs_get_writer(struct cifsInodeInfo *cinode)
int
rc
;
start:
#if (RHEL_RELEASE_VERSION(RHEL_MAJOR,RHEL_MINOR) >= 1795)
rc
=
wait_on_bit
(
&
cinode
->
flags
,
CIFS_INODE_PENDING_OPLOCK_BREAK
,
TASK_KILLABLE
);
#else
rc
=
wait_on_bit
(
&
cinode
->
flags
,
CIFS_INODE_PENDING_OPLOCK_BREAK
,
cifs_oplock_break_wait
,
TASK_KILLABLE
);
#endif
if
(
rc
)
return
rc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment