aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/dir.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-05-11 01:22:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 11:29:32 -0400
commit45222b9e02fb282eb0a8007a3d992dd229ec2410 (patch)
tree2160228a23c700437bda0898d3a700ac499b941d /fs/afs/dir.c
parent0f300ca9284caabdd2c07c7f91b90f1f530f614e (diff)
AFS: implement statfs
Implement the statfs() op for AFS. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/dir.c')
-rw-r--r--fs/afs/dir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 2fb31276196b..719af4fb15dc 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -497,7 +497,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
497 497
498 ASSERTCMP(dentry->d_inode, ==, NULL); 498 ASSERTCMP(dentry->d_inode, ==, NULL);
499 499
500 if (dentry->d_name.len > 255) { 500 if (dentry->d_name.len >= AFSNAMEMAX) {
501 _leave(" = -ENAMETOOLONG"); 501 _leave(" = -ENAMETOOLONG");
502 return ERR_PTR(-ENAMETOOLONG); 502 return ERR_PTR(-ENAMETOOLONG);
503 } 503 }
@@ -736,7 +736,7 @@ static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
736 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); 736 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
737 737
738 ret = -ENAMETOOLONG; 738 ret = -ENAMETOOLONG;
739 if (dentry->d_name.len > 255) 739 if (dentry->d_name.len >= AFSNAMEMAX)
740 goto error; 740 goto error;
741 741
742 key = afs_request_key(dvnode->volume->cell); 742 key = afs_request_key(dvnode->volume->cell);
@@ -801,7 +801,7 @@ static int afs_rmdir(struct inode *dir, struct dentry *dentry)
801 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name); 801 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name);
802 802
803 ret = -ENAMETOOLONG; 803 ret = -ENAMETOOLONG;
804 if (dentry->d_name.len > 255) 804 if (dentry->d_name.len >= AFSNAMEMAX)
805 goto error; 805 goto error;
806 806
807 key = afs_request_key(dvnode->volume->cell); 807 key = afs_request_key(dvnode->volume->cell);
@@ -847,7 +847,7 @@ static int afs_unlink(struct inode *dir, struct dentry *dentry)
847 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name); 847 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name);
848 848
849 ret = -ENAMETOOLONG; 849 ret = -ENAMETOOLONG;
850 if (dentry->d_name.len > 255) 850 if (dentry->d_name.len >= AFSNAMEMAX)
851 goto error; 851 goto error;
852 852
853 key = afs_request_key(dvnode->volume->cell); 853 key = afs_request_key(dvnode->volume->cell);
@@ -921,7 +921,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
921 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); 921 dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
922 922
923 ret = -ENAMETOOLONG; 923 ret = -ENAMETOOLONG;
924 if (dentry->d_name.len > 255) 924 if (dentry->d_name.len >= AFSNAMEMAX)
925 goto error; 925 goto error;
926 926
927 key = afs_request_key(dvnode->volume->cell); 927 key = afs_request_key(dvnode->volume->cell);
@@ -990,7 +990,7 @@ static int afs_link(struct dentry *from, struct inode *dir,
990 dentry->d_name.name); 990 dentry->d_name.name);
991 991
992 ret = -ENAMETOOLONG; 992 ret = -ENAMETOOLONG;
993 if (dentry->d_name.len > 255) 993 if (dentry->d_name.len >= AFSNAMEMAX)
994 goto error; 994 goto error;
995 995
996 key = afs_request_key(dvnode->volume->cell); 996 key = afs_request_key(dvnode->volume->cell);
@@ -1038,11 +1038,11 @@ static int afs_symlink(struct inode *dir, struct dentry *dentry,
1038 content); 1038 content);
1039 1039
1040 ret = -ENAMETOOLONG; 1040 ret = -ENAMETOOLONG;
1041 if (dentry->d_name.len > 255) 1041 if (dentry->d_name.len >= AFSNAMEMAX)
1042 goto error; 1042 goto error;
1043 1043
1044 ret = -EINVAL; 1044 ret = -EINVAL;
1045 if (strlen(content) > 1023) 1045 if (strlen(content) >= AFSPATHMAX)
1046 goto error; 1046 goto error;
1047 1047
1048 key = afs_request_key(dvnode->volume->cell); 1048 key = afs_request_key(dvnode->volume->cell);
@@ -1112,7 +1112,7 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
1112 new_dentry->d_name.name); 1112 new_dentry->d_name.name);
1113 1113
1114 ret = -ENAMETOOLONG; 1114 ret = -ENAMETOOLONG;
1115 if (new_dentry->d_name.len > 255) 1115 if (new_dentry->d_name.len >= AFSNAMEMAX)
1116 goto error; 1116 goto error;
1117 1117
1118 key = afs_request_key(orig_dvnode->volume->cell); 1118 key = afs_request_key(orig_dvnode->volume->cell);