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
ddb696cc
Commit
ddb696cc
authored
Aug 03, 2009
by
Evgeny Sinelnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
legacy: Fix build with {clear,drop,inc}_nlink() functions
parent
f89c0769
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
inode.c
sources/legacy/inode.c
+11
-13
No files found.
sources/legacy/inode.c
View file @
ddb696cc
...
...
@@ -32,18 +32,16 @@
#include <linux/buffer_head.h>
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
static
inline
void
clear_nlink
(
struct
inode
*
inode
)
static
inline
void
legacy_clear_nlink
(
struct
inode
*
inode
)
{
inode
->
i_nlink
=
0
;
}
static
inline
void
drop_nlink
(
struct
inode
*
inode
)
static
inline
void
legacy_
drop_nlink
(
struct
inode
*
inode
)
{
inode
->
i_nlink
--
;
}
#endif
static
inline
void
fc8
_inc_nlink
(
struct
inode
*
inode
)
static
inline
void
legacy
_inc_nlink
(
struct
inode
*
inode
)
{
inode
->
i_nlink
++
;
}
...
...
@@ -657,7 +655,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
psx_del_no_retry:
if
(
!
rc
)
{
if
(
direntry
->
d_inode
)
drop_nlink
(
direntry
->
d_inode
);
legacy_
drop_nlink
(
direntry
->
d_inode
);
}
else
if
(
rc
==
-
ENOENT
)
{
d_drop
(
direntry
);
}
else
if
(
rc
==
-
ETXTBSY
)
{
...
...
@@ -676,7 +674,7 @@ psx_del_no_retry:
CIFS_MOUNT_MAP_SPECIAL_CHR
);
CIFSSMBClose
(
xid
,
pTcon
,
netfid
);
if
(
direntry
->
d_inode
)
drop_nlink
(
direntry
->
d_inode
);
legacy_
drop_nlink
(
direntry
->
d_inode
);
}
}
else
if
(
rc
==
-
EACCES
)
{
/* try only if r/o attribute set in local lookup data? */
...
...
@@ -729,7 +727,7 @@ psx_del_no_retry:
CIFS_MOUNT_MAP_SPECIAL_CHR
);
if
(
!
rc
)
{
if
(
direntry
->
d_inode
)
drop_nlink
(
direntry
->
d_inode
);
legacy_
drop_nlink
(
direntry
->
d_inode
);
}
else
if
(
rc
==
-
ETXTBSY
)
{
int
oplock
=
FALSE
;
__u16
netfid
;
...
...
@@ -750,7 +748,7 @@ psx_del_no_retry:
CIFS_MOUNT_MAP_SPECIAL_CHR
);
CIFSSMBClose
(
xid
,
pTcon
,
netfid
);
if
(
direntry
->
d_inode
)
drop_nlink
(
direntry
->
d_inode
);
legacy_
drop_nlink
(
direntry
->
d_inode
);
}
/* BB if rc = -ETXTBUSY goto the rename logic BB */
}
...
...
@@ -957,7 +955,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
}
/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need
to set uid/gid */
fc8
_inc_nlink
(
inode
);
legacy
_inc_nlink
(
inode
);
if
(
pTcon
->
nocase
)
direntry
->
d_op
=
&
cifs_ci_dentry_ops
;
else
...
...
@@ -1007,7 +1005,7 @@ mkdir_retry_old:
d_drop
(
direntry
);
}
else
{
mkdir_get_info:
fc8
_inc_nlink
(
inode
);
legacy
_inc_nlink
(
inode
);
if
(
pTcon
->
unix_ext
)
rc
=
cifs_get_inode_info_unix
(
&
newinode
,
full_path
,
inode
->
i_sb
,
xid
);
...
...
@@ -1092,10 +1090,10 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_MAP_SPECIAL_CHR
);
if
(
!
rc
)
{
drop_nlink
(
inode
);
legacy_
drop_nlink
(
inode
);
spin_lock
(
&
direntry
->
d_inode
->
i_lock
);
i_size_write
(
direntry
->
d_inode
,
0
);
clear_nlink
(
direntry
->
d_inode
);
legacy_
clear_nlink
(
direntry
->
d_inode
);
spin_unlock
(
&
direntry
->
d_inode
->
i_lock
);
}
...
...
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