diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-08-11 12:39:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:13:03 -0400 |
commit | f3f8e17571934ea253339e15c4ec9b34ea623c6b (patch) | |
tree | ad3375ace9781dd3912a7b3258a8cbf0b31837d1 | |
parent | 9308a6128d9074e348d9f9b5822546fe12a794a9 (diff) |
[PATCH] reduce the stack footprint of exportfs_decode_fh()
no need to have _two_ 256-byte arrays on stack...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/exportfs/expfs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 7b0f75dcf800..51bdc5cab069 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -94,9 +94,8 @@ find_disconnected_root(struct dentry *dentry) | |||
94 | * It may already be, as the flag isn't always updated when connection happens. | 94 | * It may already be, as the flag isn't always updated when connection happens. |
95 | */ | 95 | */ |
96 | static int | 96 | static int |
97 | reconnect_path(struct vfsmount *mnt, struct dentry *target_dir) | 97 | reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) |
98 | { | 98 | { |
99 | char nbuf[NAME_MAX+1]; | ||
100 | int noprogress = 0; | 99 | int noprogress = 0; |
101 | int err = -ESTALE; | 100 | int err = -ESTALE; |
102 | 101 | ||
@@ -360,6 +359,7 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, | |||
360 | { | 359 | { |
361 | const struct export_operations *nop = mnt->mnt_sb->s_export_op; | 360 | const struct export_operations *nop = mnt->mnt_sb->s_export_op; |
362 | struct dentry *result, *alias; | 361 | struct dentry *result, *alias; |
362 | char nbuf[NAME_MAX+1]; | ||
363 | int err; | 363 | int err; |
364 | 364 | ||
365 | /* | 365 | /* |
@@ -379,7 +379,7 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, | |||
379 | * filesystem root. | 379 | * filesystem root. |
380 | */ | 380 | */ |
381 | if (result->d_flags & DCACHE_DISCONNECTED) { | 381 | if (result->d_flags & DCACHE_DISCONNECTED) { |
382 | err = reconnect_path(mnt, result); | 382 | err = reconnect_path(mnt, result, nbuf); |
383 | if (err) | 383 | if (err) |
384 | goto err_result; | 384 | goto err_result; |
385 | } | 385 | } |
@@ -395,7 +395,6 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, | |||
395 | * It's not a directory. Life is a little more complicated. | 395 | * It's not a directory. Life is a little more complicated. |
396 | */ | 396 | */ |
397 | struct dentry *target_dir, *nresult; | 397 | struct dentry *target_dir, *nresult; |
398 | char nbuf[NAME_MAX+1]; | ||
399 | 398 | ||
400 | /* | 399 | /* |
401 | * See if either the dentry we just got from the filesystem | 400 | * See if either the dentry we just got from the filesystem |
@@ -429,7 +428,7 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, | |||
429 | * connected to the filesystem root. The VFS really doesn't | 428 | * connected to the filesystem root. The VFS really doesn't |
430 | * like disconnected directories.. | 429 | * like disconnected directories.. |
431 | */ | 430 | */ |
432 | err = reconnect_path(mnt, target_dir); | 431 | err = reconnect_path(mnt, target_dir, nbuf); |
433 | if (err) { | 432 | if (err) { |
434 | dput(target_dir); | 433 | dput(target_dir); |
435 | goto err_result; | 434 | goto err_result; |