Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f051a69f
Commit
f051a69f
authored
May 24, 2004
by
Steve French
Committed by
Steve French
May 24, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retry build_path_from_dentry if parent path changes in flight
parent
40474c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
fs/cifs/dir.c
fs/cifs/dir.c
+18
-1
No files found.
fs/cifs/dir.c
View file @
f051a69f
...
...
@@ -54,9 +54,14 @@ build_path_from_dentry(struct dentry *direntry)
we need to reopen the file after it was closed implicitly
when the server crashed */
cifs_bp_rename_retry:
for
(
temp
=
direntry
;
!
IS_ROOT
(
temp
);)
{
namelen
+=
(
1
+
temp
->
d_name
.
len
);
temp
=
temp
->
d_parent
;
if
(
temp
==
NULL
)
{
cERROR
(
1
,(
"corrupt dentry"
));
return
NULL
;
}
}
full_path
=
kmalloc
(
namelen
+
1
,
GFP_KERNEL
);
...
...
@@ -75,11 +80,23 @@ build_path_from_dentry(struct dentry *direntry)
cFYI
(
0
,
(
" name: %s "
,
full_path
+
namelen
));
}
temp
=
temp
->
d_parent
;
if
(
temp
==
NULL
)
{
cERROR
(
1
,(
"corrupt dentry"
));
kfree
(
full_path
);
return
NULL
;
}
}
if
(
namelen
!=
0
)
if
(
namelen
!=
0
)
{
cERROR
(
1
,
(
"We did not end path lookup where we expected namelen is %d"
,
namelen
));
/* presumably this is only possible if we were racing with a rename
of one of the parent directories (we can not lock the dentries
above us to prevent this, but retrying should be harmless) */
kfree
(
full_path
);
namelen
=
0
;
goto
cifs_bp_rename_retry
;
}
return
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