aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/upcall.c
diff options
context:
space:
mode:
authorJan Harkes <jaharkes@cs.cmu.edu>2007-07-21 07:37:26 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-21 20:49:14 -0400
commitd3fec424b23c47686efcf3f2004c3f1c1cee4d9c (patch)
treeffad3cf369d35e85fca9a340347eea09caa53ff3 /fs/coda/upcall.c
parentb50731732f926d6c49fd0724616a7344c31cd5cf (diff)
coda: remove CODA_STORE/CODA_RELEASE upcalls
This is an variation on the patch sent by Christoph Hellwig which kills file_count abuse by the Coda kernel module by moving the coda_flush functionality into coda_release. However part of reason we were using the coda_flush callback was to allow Coda to pass errors that occur during writeback from the userspace cache manager back to close(). As Al Viro explained on linux-fsdevel, it is impossible to guarantee that such errors can in fact be returned back to the caller. There are many cases where the last reference to a file is not released by the close system call and it is also impossible to pick some close as a 'last-close' and delay it until all other references have been destroyed. The CODA_STORE/CODA_RELEASE upcall combination is clearly a broken design, and it is better to remove it completely. Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coda/upcall.c')
-rw-r--r--fs/coda/upcall.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index cd561d2e90b0..cdb4c07a7870 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -160,55 +160,8 @@ int venus_lookup(struct super_block *sb, struct CodaFid *fid,
160 return error; 160 return error;
161} 161}
162 162
163int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
164 vuid_t uid)
165{
166 union inputArgs *inp;
167 union outputArgs *outp;
168 int insize, outsize, error;
169#ifdef CONFIG_CODA_FS_OLD_API
170 struct coda_cred cred = { 0, };
171 cred.cr_fsuid = uid;
172#endif
173
174 insize = SIZE(store);
175 UPARG(CODA_STORE);
176
177#ifdef CONFIG_CODA_FS_OLD_API
178 memcpy(&(inp->ih.cred), &cred, sizeof(cred));
179#else
180 inp->ih.uid = uid;
181#endif
182
183 inp->coda_store.VFid = *fid;
184 inp->coda_store.flags = flags;
185
186 error = coda_upcall(coda_vcp(sb), insize, &outsize, inp);
187
188 CODA_FREE(inp, insize);
189 return error;
190}
191
192int venus_release(struct super_block *sb, struct CodaFid *fid, int flags)
193{
194 union inputArgs *inp;
195 union outputArgs *outp;
196 int insize, outsize, error;
197
198 insize = SIZE(release);
199 UPARG(CODA_RELEASE);
200
201 inp->coda_release.VFid = *fid;
202 inp->coda_release.flags = flags;
203
204 error = coda_upcall(coda_vcp(sb), insize, &outsize, inp);
205
206 CODA_FREE(inp, insize);
207 return error;
208}
209
210int venus_close(struct super_block *sb, struct CodaFid *fid, int flags, 163int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
211 vuid_t uid) 164 vuid_t uid)
212{ 165{
213 union inputArgs *inp; 166 union inputArgs *inp;
214 union outputArgs *outp; 167 union outputArgs *outp;