]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/attr.c
[ARM] 5321/1: Kirkwood: fix typo in Makefile
[linux-2.6-omap-h63xx.git] / fs / attr.c
index 765fc75fab3b0d0bfc3d26ba2ed18235cf48f5cd..26c71ba1eed49d2f500c9e8044e68693492a47ee 100644 (file)
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -108,6 +108,11 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
        struct timespec now;
        unsigned int ia_valid = attr->ia_valid;
 
+       if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) {
+               if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+                       return -EPERM;
+       }
+
        now = current_fs_time(inode->i_sb);
 
        attr->ia_ctime = now;