Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
987f8dfc
Commit
987f8dfc
authored
15 years ago
by
Trond Myklebust
Browse files
Options
Downloads
Patches
Plain Diff
NFS: Reduce stack footprint of nfs_setattr()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
0ab64e0e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/nfs/inode.c
+10
-4
10 additions, 4 deletions
fs/nfs/inode.c
with
10 additions
and
4 deletions
fs/nfs/inode.c
+
10
−
4
View file @
987f8dfc
...
@@ -393,8 +393,8 @@ int
...
@@ -393,8 +393,8 @@ int
nfs_setattr
(
struct
dentry
*
dentry
,
struct
iattr
*
attr
)
nfs_setattr
(
struct
dentry
*
dentry
,
struct
iattr
*
attr
)
{
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
nfs_fattr
fattr
;
struct
nfs_fattr
*
fattr
;
int
error
;
int
error
=
-
ENOMEM
;
nfs_inc_stats
(
inode
,
NFSIOS_VFSSETATTR
);
nfs_inc_stats
(
inode
,
NFSIOS_VFSSETATTR
);
...
@@ -417,14 +417,20 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
...
@@ -417,14 +417,20 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
filemap_write_and_wait
(
inode
->
i_mapping
);
filemap_write_and_wait
(
inode
->
i_mapping
);
nfs_wb_all
(
inode
);
nfs_wb_all
(
inode
);
}
}
fattr
=
nfs_alloc_fattr
();
if
(
fattr
==
NULL
)
goto
out
;
/*
/*
* Return any delegations if we're going to change ACLs
* Return any delegations if we're going to change ACLs
*/
*/
if
((
attr
->
ia_valid
&
(
ATTR_MODE
|
ATTR_UID
|
ATTR_GID
))
!=
0
)
if
((
attr
->
ia_valid
&
(
ATTR_MODE
|
ATTR_UID
|
ATTR_GID
))
!=
0
)
nfs_inode_return_delegation
(
inode
);
nfs_inode_return_delegation
(
inode
);
error
=
NFS_PROTO
(
inode
)
->
setattr
(
dentry
,
&
fattr
,
attr
);
error
=
NFS_PROTO
(
inode
)
->
setattr
(
dentry
,
fattr
,
attr
);
if
(
error
==
0
)
if
(
error
==
0
)
nfs_refresh_inode
(
inode
,
&
fattr
);
nfs_refresh_inode
(
inode
,
fattr
);
nfs_free_fattr
(
fattr
);
out:
return
error
;
return
error
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment