aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-12-06 20:35:51 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:32 -0800
commitb2d2272fae1e1df26ec8f93a6d5baea891dcce37 (patch)
tree468c5bdf5a7d5b604337e582ee8eed62f098e832 /fs/fuse/dir.c
parentd809161402e9f99aefe8848c4e701597ac367269 (diff)
downloadkernel_goldelico_gta04-b2d2272fae1e1df26ec8f93a6d5baea891dcce37.zip
kernel_goldelico_gta04-b2d2272fae1e1df26ec8f93a6d5baea891dcce37.tar.gz
kernel_goldelico_gta04-b2d2272fae1e1df26ec8f93a6d5baea891dcce37.tar.bz2
[PATCH] fuse: add bmap support
Add support for the BMAP operation for block device based filesystems. This is needed to support swap-files and lilo. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 677f3ed..1cabdb2 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1024,6 +1024,8 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr)
if (attr->ia_valid & ATTR_SIZE) {
unsigned long limit;
is_truncate = 1;
+ if (IS_SWAPFILE(inode))
+ return -ETXTBSY;
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
if (limit != RLIM_INFINITY && attr->ia_size > (loff_t) limit) {
send_sig(SIGXFSZ, current, 0);