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
nexedi
linux
Commits
20b5050b
Commit
20b5050b
authored
May 02, 2004
by
Steve French
Committed by
Steve French
May 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not refresh mode (e.g. in revalidate) to windows servers
parent
32901365
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
fs/cifs/file.c
fs/cifs/file.c
+13
-6
fs/cifs/inode.c
fs/cifs/inode.c
+11
-5
No files found.
fs/cifs/file.c
View file @
20b5050b
...
...
@@ -1184,7 +1184,6 @@ fill_in_inode(struct inode *tmp_inode,
pfindData
->
EndOfFile
=
le64_to_cpu
(
pfindData
->
EndOfFile
);
cifsInfo
->
cifsAttrs
=
pfindData
->
ExtFileAttributes
;
cifsInfo
->
time
=
jiffies
;
atomic_inc
(
&
cifsInfo
->
inUse
);
/* inc on every refresh of inode info */
/* Linux can not store file creation time unfortunately so ignore it */
tmp_inode
->
i_atime
=
...
...
@@ -1197,10 +1196,12 @@ fill_in_inode(struct inode *tmp_inode,
/* 2767 perms - indicate mandatory locking */
/* BB fill in uid and gid here? with help from winbind?
or retrieve from NTFS stream extended attribute */
tmp_inode
->
i_uid
=
cifs_sb
->
mnt_uid
;
tmp_inode
->
i_gid
=
cifs_sb
->
mnt_gid
;
/* set default mode. will override for dirs below */
tmp_inode
->
i_mode
=
cifs_sb
->
mnt_file_mode
;
if
(
atomic_read
(
&
cifsInfo
->
inUse
)
==
0
)
{
tmp_inode
->
i_uid
=
cifs_sb
->
mnt_uid
;
tmp_inode
->
i_gid
=
cifs_sb
->
mnt_gid
;
/* set default mode. will override for dirs below */
tmp_inode
->
i_mode
=
cifs_sb
->
mnt_file_mode
;
}
cFYI
(
0
,
(
"CIFS FFIRST: Attributes came in as 0x%x"
,
...
...
@@ -1212,7 +1213,9 @@ fill_in_inode(struct inode *tmp_inode,
}
else
if
(
pfindData
->
ExtFileAttributes
&
ATTR_DIRECTORY
)
{
*
pobject_type
=
DT_DIR
;
/* override default perms since we do not lock dirs */
tmp_inode
->
i_mode
=
cifs_sb
->
mnt_dir_mode
;
if
(
atomic_read
(
&
cifsInfo
->
inUse
)
==
0
)
{
tmp_inode
->
i_mode
=
cifs_sb
->
mnt_dir_mode
;
}
tmp_inode
->
i_mode
|=
S_IFDIR
;
}
else
{
*
pobject_type
=
DT_REG
;
...
...
@@ -1223,6 +1226,10 @@ fill_in_inode(struct inode *tmp_inode,
}
/* could add code here - to validate if device or weird share type? */
/* can not fill in nlink here as in qpathinfo version and Unx search */
if
(
atomic_read
(
&
cifsInfo
->
inUse
)
==
0
)
{
atomic_set
(
&
cifsInfo
->
inUse
,
1
);
}
i_size_write
(
tmp_inode
,
pfindData
->
EndOfFile
);
tmp_inode
->
i_blocks
=
(
tmp_inode
->
i_blksize
-
1
+
pfindData
->
AllocationSize
)
>>
tmp_inode
->
i_blkbits
;
...
...
fs/cifs/inode.c
View file @
20b5050b
...
...
@@ -94,7 +94,7 @@ cifs_get_inode_info_unix(struct inode **pinode,
cFYI
(
1
,
(
" Old time %ld "
,
cifsInfo
->
time
));
cifsInfo
->
time
=
jiffies
;
cFYI
(
1
,
(
" New time %ld "
,
cifsInfo
->
time
));
atomic_
inc
(
&
cifsInfo
->
inUse
);
/* inc
on every refresh of inode */
atomic_
set
(
&
cifsInfo
->
inUse
,
1
);
/* ok to set
on every refresh of inode */
inode
->
i_atime
=
cifs_NTtimeToUnix
(
le64_to_cpu
(
findData
.
LastAccessTime
));
...
...
@@ -238,7 +238,6 @@ cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
cFYI
(
1
,
(
" Old time %ld "
,
cifsInfo
->
time
));
cifsInfo
->
time
=
jiffies
;
cFYI
(
1
,
(
" New time %ld "
,
cifsInfo
->
time
));
atomic_inc
(
&
cifsInfo
->
inUse
);
/* inc on every refresh of inode */
/* blksize needs to be multiple of two. So safer to default to blksize
and blkbits set in superblock so 2**blkbits and blksize will match */
...
...
@@ -256,7 +255,9 @@ cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
(
" Attributes came in as 0x%x "
,
pfindData
->
Attributes
));
/* set default mode. will override for dirs below */
inode
->
i_mode
=
cifs_sb
->
mnt_file_mode
;
if
(
atomic_read
(
&
cifsInfo
->
inUse
)
==
0
)
/* new inode, can safely set these fields */
inode
->
i_mode
=
cifs_sb
->
mnt_file_mode
;
if
(
pfindData
->
Attributes
&
ATTR_REPARSE
)
{
/* Can IFLNK be set as it basically is on windows with IFREG or IFDIR? */
...
...
@@ -281,8 +282,13 @@ cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
/* BB fill in uid and gid here? with help from winbind?
or retrieve from NTFS stream extended attribute */
inode
->
i_uid
=
cifs_sb
->
mnt_uid
;
inode
->
i_gid
=
cifs_sb
->
mnt_gid
;
if
(
atomic_read
(
&
cifsInfo
->
inUse
)
==
0
)
{
inode
->
i_uid
=
cifs_sb
->
mnt_uid
;
inode
->
i_gid
=
cifs_sb
->
mnt_gid
;
/* set so we do not keep refreshing these fields with
bad data after user has changed them in memory */
atomic_set
(
&
cifsInfo
->
inUse
,
1
);
}
if
(
S_ISREG
(
inode
->
i_mode
))
{
cFYI
(
1
,
(
" File inode "
));
...
...
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