summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi2006-12-07 05:35:51 +0100
committerLinus Torvalds2006-12-07 17:39:32 +0100
commitb2d2272fae1e1df26ec8f93a6d5baea891dcce37 (patch)
tree468c5bdf5a7d5b604337e582ee8eed62f098e832 /fs/fuse/dir.c
parent[PATCH] fuse: add blksize option (diff)
downloadkernel-qcow2-linux-b2d2272fae1e1df26ec8f93a6d5baea891dcce37.tar.gz
kernel-qcow2-linux-b2d2272fae1e1df26ec8f93a6d5baea891dcce37.tar.xz
kernel-qcow2-linux-b2d2272fae1e1df26ec8f93a6d5baea891dcce37.zip
[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 677f3ed7f987..1cabdb229adb 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);