]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/open.c
[patch 1/5] vfs: truncate: dont check immutable twice
[linux-2.6-omap-h63xx.git] / fs / open.c
index a99ad09c3197a1f60e4332f86520183cffa50bbd..b2e4c93aed03ab4d548552588edd9aca664e0880 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -64,7 +64,8 @@ static int vfs_statfs_native(struct dentry *dentry, struct statfs *buf)
                memcpy(buf, &st, sizeof(st));
        else {
                if (sizeof buf->f_blocks == 4) {
-                       if ((st.f_blocks | st.f_bfree | st.f_bavail) &
+                       if ((st.f_blocks | st.f_bfree | st.f_bavail |
+                            st.f_bsize | st.f_frsize) &
                            0xffffffff00000000ULL)
                                return -EOVERFLOW;
                        /*
@@ -255,7 +256,7 @@ static long do_sys_truncate(const char __user * path, loff_t length)
                goto mnt_drop_write_and_out;
 
        error = -EPERM;
-       if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+       if (IS_APPEND(inode))
                goto mnt_drop_write_and_out;
 
        error = get_write_access(inode);