Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
ff694527
Commit
ff694527
authored
Apr 20, 2009
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] Make cifs_unlink consistent in checks for null inode
Signed-off-by:
Steve French
<
sfrench@us.ibm.com
>
parent
ff54250a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
fs/cifs/CHANGES
fs/cifs/CHANGES
+6
-0
fs/cifs/cifsfs.h
fs/cifs/cifsfs.h
+1
-1
fs/cifs/inode.c
fs/cifs/inode.c
+15
-6
No files found.
fs/cifs/CHANGES
View file @
ff694527
Version 1.58
------------
Guard against buffer overruns in various UCS-2 to UTF-8 string conversions
when the UTF-8 string is composed of unusually long (more than 4 byte) converted
characters.
Version 1.57
------------
Improve support for multiple security contexts to the same server. We
...
...
fs/cifs/cifsfs.h
View file @
ff694527
...
...
@@ -100,5 +100,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
extern
const
struct
export_operations
cifs_export_ops
;
#endif
/* EXPERIMENTAL */
#define CIFS_VERSION "1.5
7
"
#define CIFS_VERSION "1.5
8
"
#endif
/* _CIFSFS_H */
fs/cifs/inode.c
View file @
ff694527
...
...
@@ -962,13 +962,21 @@ undo_setattr:
goto
out_close
;
}
/*
* If dentry->d_inode is null (usually meaning the cached dentry
* is a negative dentry) then we would attempt a standard SMB delete, but
* if that fails we can not attempt the fall back mechanisms on EACESS
* but will return the EACESS to the caller. Note that the VFS does not call
* unlink on negative dentries currently.
*/
int
cifs_unlink
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
int
rc
=
0
;
int
xid
;
char
*
full_path
=
NULL
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
cifsInodeInfo
*
cifs
Inode
=
CIFS_I
(
inode
)
;
struct
cifsInodeInfo
*
cifs
_inode
;
struct
super_block
*
sb
=
dir
->
i_sb
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifsTconInfo
*
tcon
=
cifs_sb
->
tcon
;
...
...
@@ -1012,7 +1020,7 @@ psx_del_no_retry:
rc
=
cifs_rename_pending_delete
(
full_path
,
dentry
,
xid
);
if
(
rc
==
0
)
drop_nlink
(
inode
);
}
else
if
(
rc
==
-
EACCES
&&
dosattr
==
0
)
{
}
else
if
(
(
rc
==
-
EACCES
)
&&
(
dosattr
==
0
)
&&
inode
)
{
attrs
=
kzalloc
(
sizeof
(
*
attrs
),
GFP_KERNEL
);
if
(
attrs
==
NULL
)
{
rc
=
-
ENOMEM
;
...
...
@@ -1020,7 +1028,8 @@ psx_del_no_retry:
}
/* try to reset dos attributes */
origattr
=
cifsInode
->
cifsAttrs
;
cifs_inode
=
CIFS_I
(
inode
);
origattr
=
cifs_inode
->
cifsAttrs
;
if
(
origattr
==
0
)
origattr
|=
ATTR_NORMAL
;
dosattr
=
origattr
&
~
ATTR_READONLY
;
...
...
@@ -1041,13 +1050,13 @@ psx_del_no_retry:
out_reval:
if
(
inode
)
{
cifs
I
node
=
CIFS_I
(
inode
);
cifs
I
node
->
time
=
0
;
/* will force revalidate to get info
cifs
_i
node
=
CIFS_I
(
inode
);
cifs
_i
node
->
time
=
0
;
/* will force revalidate to get info
when needed */
inode
->
i_ctime
=
current_fs_time
(
sb
);
}
dir
->
i_ctime
=
dir
->
i_mtime
=
current_fs_time
(
sb
);
cifs
I
node
=
CIFS_I
(
dir
);
cifs
_i
node
=
CIFS_I
(
dir
);
CIFS_I
(
dir
)
->
time
=
0
;
/* force revalidate of dir as well */
kfree
(
full_path
);
...
...
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