]> Pileus Git - ~andy/linux/blobdiff - mm/shmem.c
Merge branches 'irq-fixes-for-linus' and 'sched-fixes-for-linus' of git://git.kernel...
[~andy/linux] / mm / shmem.c
index 7c9cdc6fe137f24c2453181a2169976fb979df7d..048a95a5244d4eb5522c7aa17fa94ca625f660f5 100644 (file)
@@ -779,7 +779,7 @@ static int shmem_notify_change(struct dentry *dentry, struct iattr *attr)
                         * If truncating down to a partial page, then
                         * if that page is already allocated, hold it
                         * in memory until the truncation is over, so
-                        * truncate_partial_page cannnot miss it were
+                        * truncate_partial_page cannot miss it were
                         * it assigned to swap.
                         */
                        if (newsize & (PAGE_CACHE_SIZE-1)) {
@@ -2145,8 +2145,10 @@ static int shmem_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
 {
        struct inode *inode = dentry->d_inode;
 
-       if (*len < 3)
+       if (*len < 3) {
+               *len = 3;
                return 255;
+       }
 
        if (inode_unhashed(inode)) {
                /* Unfortunately insert_inode_hash is not idempotent,