29 Sep, 2020

1 commit


27 Aug, 2019

1 commit

  • Windows presents files created within Linux as read-only, even when
    permissions in Linux indicate the file should be writable.

    UDF defines a slightly different set of basic file permissions than Linux.
    Specifically, UDF has "delete" and "change attribute" permissions for each
    access class (user/group/other). Linux has no equivalents for these.

    When the Linux UDF driver creates a file (or directory), no UDF delete or
    change attribute permissions are granted. The lack of delete permission
    appears to cause Windows to mark an item read-only when its permissions
    otherwise indicate that it should be read-write.

    Fix this by having UDF delete permissions track Linux write permissions.
    Also grant UDF change attribute permission to the owner when creating a
    new inode.

    Reported by: Ty Young
    Signed-off-by: Steven J. Magnani
    Link: https://lore.kernel.org/r/20190827121359.9954-1-steve@digidescorp.com
    Signed-off-by: Jan Kara

    Steven J. Magnani
     

27 Jun, 2018

1 commit

  • The VFS structures are finally converted to always use 64-bit timestamps,
    and this file system can represent a long range of on-disk timestamps
    already, so now let's fit in the missing bits for udf.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jan Kara

    Arnd Bergmann
     

06 Jun, 2018

1 commit

  • struct timespec is not y2038 safe. Transition vfs to use
    y2038 safe struct timespec64 instead.

    The change was made with the help of the following cocinelle
    script. This catches about 80% of the changes.
    All the header file and logic changes are included in the
    first 5 rules. The rest are trivial substitutions.
    I avoid changing any of the function signatures or any other
    filesystem specific data structures to keep the patch simple
    for review.

    The script can be a little shorter by combining different cases.
    But, this version was sufficient for my usecase.

    virtual patch

    @ depends on patch @
    identifier now;
    @@
    - struct timespec
    + struct timespec64
    current_time ( ... )
    {
    - struct timespec now = current_kernel_time();
    + struct timespec64 now = current_kernel_time64();
    ...
    - return timespec_trunc(
    + return timespec64_trunc(
    ... );
    }

    @ depends on patch @
    identifier xtime;
    @@
    struct \( iattr \| inode \| kstat \) {
    ...
    - struct timespec xtime;
    + struct timespec64 xtime;
    ...
    }

    @ depends on patch @
    identifier t;
    @@
    struct inode_operations {
    ...
    int (*update_time) (...,
    - struct timespec t,
    + struct timespec64 t,
    ...);
    ...
    }

    @ depends on patch @
    identifier t;
    identifier fn_update_time =~ "update_time$";
    @@
    fn_update_time (...,
    - struct timespec *t,
    + struct timespec64 *t,
    ...) { ... }

    @ depends on patch @
    identifier t;
    @@
    lease_get_mtime( ... ,
    - struct timespec *t
    + struct timespec64 *t
    ) { ... }

    @te depends on patch forall@
    identifier ts;
    local idexpression struct inode *inode_node;
    identifier i_xtime =~ "^i_[acm]time$";
    identifier ia_xtime =~ "^ia_[acm]time$";
    identifier fn_update_time =~ "update_time$";
    identifier fn;
    expression e, E3;
    local idexpression struct inode *node1;
    local idexpression struct inode *node2;
    local idexpression struct iattr *attr1;
    local idexpression struct iattr *attr2;
    local idexpression struct iattr attr;
    identifier i_xtime1 =~ "^i_[acm]time$";
    identifier i_xtime2 =~ "^i_[acm]time$";
    identifier ia_xtime1 =~ "^ia_[acm]time$";
    identifier ia_xtime2 =~ "^ia_[acm]time$";
    @@
    (
    (
    - struct timespec ts;
    + struct timespec64 ts;
    |
    - struct timespec ts = current_time(inode_node);
    + struct timespec64 ts = current_time(inode_node);
    )

    i_xtime, &ts)
    + timespec64_equal(&inode_node->i_xtime, &ts)
    |
    - timespec_equal(&ts, &inode_node->i_xtime)
    + timespec64_equal(&ts, &inode_node->i_xtime)
    |
    - timespec_compare(&inode_node->i_xtime, &ts)
    + timespec64_compare(&inode_node->i_xtime, &ts)
    |
    - timespec_compare(&ts, &inode_node->i_xtime)
    + timespec64_compare(&ts, &inode_node->i_xtime)
    |
    ts = current_time(e)
    |
    fn_update_time(..., &ts,...)
    |
    inode_node->i_xtime = ts
    |
    node1->i_xtime = ts
    |
    ts = inode_node->i_xtime
    |
    ia_xtime ...+> = ts
    |
    ts = attr1->ia_xtime
    |
    ts.tv_sec
    |
    ts.tv_nsec
    |
    btrfs_set_stack_timespec_sec(..., ts.tv_sec)
    |
    btrfs_set_stack_timespec_nsec(..., ts.tv_nsec)
    |
    - ts = timespec64_to_timespec(
    + ts =
    ...
    -)
    |
    - ts = ktime_to_timespec(
    + ts = ktime_to_timespec64(
    ...)
    |
    - ts = E3
    + ts = timespec_to_timespec64(E3)
    |
    - ktime_get_real_ts(&ts)
    + ktime_get_real_ts64(&ts)
    |
    fn(...,
    - ts
    + timespec64_to_timespec(ts)
    ,...)
    )
    ...+>
    (

    )
    |
    - timespec_equal(&node1->i_xtime1, &node2->i_xtime2)
    + timespec64_equal(&node1->i_xtime2, &node2->i_xtime2)
    |
    - timespec_equal(&node1->i_xtime1, &attr2->ia_xtime2)
    + timespec64_equal(&node1->i_xtime2, &attr2->ia_xtime2)
    |
    - timespec_compare(&node1->i_xtime1, &node2->i_xtime2)
    + timespec64_compare(&node1->i_xtime1, &node2->i_xtime2)
    |
    node1->i_xtime1 =
    - timespec_trunc(attr1->ia_xtime1,
    + timespec64_trunc(attr1->ia_xtime1,
    ...)
    |
    - attr1->ia_xtime1 = timespec_trunc(attr2->ia_xtime2,
    + attr1->ia_xtime1 = timespec64_trunc(attr2->ia_xtime2,
    ...)
    |
    - ktime_get_real_ts(&attr1->ia_xtime1)
    + ktime_get_real_ts64(&attr1->ia_xtime1)
    |
    - ktime_get_real_ts(&attr.ia_xtime1)
    + ktime_get_real_ts64(&attr.ia_xtime1)
    )

    @ depends on patch @
    struct inode *node;
    struct iattr *attr;
    identifier fn;
    identifier i_xtime =~ "^i_[acm]time$";
    identifier ia_xtime =~ "^ia_[acm]time$";
    expression e;
    @@
    (
    - fn(node->i_xtime);
    + fn(timespec64_to_timespec(node->i_xtime));
    |
    fn(...,
    - node->i_xtime);
    + timespec64_to_timespec(node->i_xtime));
    |
    - e = fn(attr->ia_xtime);
    + e = fn(timespec64_to_timespec(attr->ia_xtime));
    )

    @ depends on patch forall @
    struct inode *node;
    struct iattr *attr;
    identifier i_xtime =~ "^i_[acm]time$";
    identifier ia_xtime =~ "^ia_[acm]time$";
    identifier fn;
    @@
    {
    + struct timespec ts;
    i_xtime);
    fn (...,
    - &node->i_xtime,
    + &ts,
    ...);
    |
    + ts = timespec64_to_timespec(attr->ia_xtime);
    fn (...,
    - &attr->ia_xtime,
    + &ts,
    ...);
    )
    ...+>
    }

    @ depends on patch forall @
    struct inode *node;
    struct iattr *attr;
    struct kstat *stat;
    identifier ia_xtime =~ "^ia_[acm]time$";
    identifier i_xtime =~ "^i_[acm]time$";
    identifier xtime =~ "^[acm]time$";
    identifier fn, ret;
    @@
    {
    + struct timespec ts;
    i_xtime);
    ret = fn (...,
    - &node->i_xtime,
    + &ts,
    ...);
    |
    + ts = timespec64_to_timespec(node->i_xtime);
    ret = fn (...,
    - &node->i_xtime);
    + &ts);
    |
    + ts = timespec64_to_timespec(attr->ia_xtime);
    ret = fn (...,
    - &attr->ia_xtime,
    + &ts,
    ...);
    |
    + ts = timespec64_to_timespec(attr->ia_xtime);
    ret = fn (...,
    - &attr->ia_xtime);
    + &ts);
    |
    + ts = timespec64_to_timespec(stat->xtime);
    ret = fn (...,
    - &stat->xtime);
    + &ts);
    )
    ...+>
    }

    @ depends on patch @
    struct inode *node;
    struct inode *node2;
    identifier i_xtime1 =~ "^i_[acm]time$";
    identifier i_xtime2 =~ "^i_[acm]time$";
    identifier i_xtime3 =~ "^i_[acm]time$";
    struct iattr *attrp;
    struct iattr *attrp2;
    struct iattr attr ;
    identifier ia_xtime1 =~ "^ia_[acm]time$";
    identifier ia_xtime2 =~ "^ia_[acm]time$";
    struct kstat *stat;
    struct kstat stat1;
    struct timespec64 ts;
    identifier xtime =~ "^[acmb]time$";
    expression e;
    @@
    (
    ( node->i_xtime2 \| attrp->ia_xtime2 \| attr.ia_xtime2 \) = node->i_xtime1 ;
    |
    node->i_xtime2 = \( node2->i_xtime1 \| timespec64_trunc(...) \);
    |
    node->i_xtime2 = node->i_xtime1 = node->i_xtime3 = \(ts \| current_time(...) \);
    |
    node->i_xtime1 = node->i_xtime3 = \(ts \| current_time(...) \);
    |
    stat->xtime = node2->i_xtime1;
    |
    stat1.xtime = node2->i_xtime1;
    |
    ( node->i_xtime2 \| attrp->ia_xtime2 \) = attrp->ia_xtime1 ;
    |
    ( attrp->ia_xtime1 \| attr.ia_xtime1 \) = attrp2->ia_xtime2;
    |
    - e = node->i_xtime1;
    + e = timespec64_to_timespec( node->i_xtime1 );
    |
    - e = attrp->ia_xtime1;
    + e = timespec64_to_timespec( attrp->ia_xtime1 );
    |
    node->i_xtime1 = current_time(...);
    |
    node->i_xtime2 = node->i_xtime1 = node->i_xtime3 =
    - e;
    + timespec_to_timespec64(e);
    |
    node->i_xtime1 = node->i_xtime3 =
    - e;
    + timespec_to_timespec64(e);
    |
    - node->i_xtime1 = e;
    + node->i_xtime1 = timespec_to_timespec64(e);
    )

    Signed-off-by: Deepa Dinamani
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:

    Deepa Dinamani
     

27 Feb, 2018

1 commit

  • Currently newly created files belong to current user despite
    uid= / gid= mount options. This is confusing to users
    (as owner of the file will change after remount / eviction from cache)
    and also inconsistent with e.g. FAT with the same mount option. So apply
    uid= and gid= also to newly created inodes and similarly
    as FAT disallow to change owner of the file in this case.

    Reported-by: Steve Kenton
    Reviewed-by: Pali Rohár
    Signed-off-by: Jan Kara

    Jan Kara
     

17 Oct, 2017

1 commit

  • Large (> 1 TiB) UDF filesystems appear subject to several problems when
    mounted on 64-bit systems:

    * readdir() can fail on a directory containing File Identifiers residing
    above 0x7FFFFFFF. This manifests as a 'ls' command failing with EIO.

    * FIBMAP on a file block located above 0x7FFFFFFF can return a negative
    value. The low 32 bits are correct, but applications that don't mask the
    high 32 bits of the result can perform incorrectly.

    Per suggestion by Jan Kara, introduce a udf_pblk_t type for representation
    of UDF block addresses. Ultimately, all driver functions that manipulate
    UDF block addresses should use this type; for now, deployment is limited
    to functions with actual or potential sign extension issues.

    Changes to udf_readdir() and udf_block_map() address the issues noted
    above; other changes address potential similar issues uncovered during
    audit of the driver code.

    Signed-off-by: Steven J. Magnani
    Signed-off-by: Jan Kara

    Steve Magnani
     

28 Sep, 2016

1 commit

  • current_fs_time() uses struct super_block* as an argument.
    As per Linus's suggestion, this is changed to take struct
    inode* as a parameter instead. This is because the function
    is primarily meant for vfs inode timestamps.
    Also the function was renamed as per Arnd's suggestion.

    Change all calls to current_fs_time() to use the new
    current_time() function instead. current_fs_time() will be
    deleted.

    Signed-off-by: Deepa Dinamani
    Signed-off-by: Al Viro

    Deepa Dinamani
     

05 Sep, 2014

3 commits

  • Signed-off-by: Al Viro
    Signed-off-by: Jan Kara

    Al Viro
     
  • Currently udf_iget() (triggered by NFS) can race with udf_new_inode()
    leading to two inode structures with the same inode number:

    nfsd: iget_locked() creates inode
    nfsd: try to read from disk, block on that.
    udf_new_inode(): allocate inode with that inumber
    udf_new_inode(): insert it into icache, set it up and dirty
    udf_write_inode(): write inode into buffer cache
    nfsd: get CPU again, look into buffer cache, see nice and sane on-disk
    inode, set the in-core inode from it

    Fix the problem by putting inode into icache in locked state (I_NEW set)
    and unlocking it only after it's fully set up.

    Signed-off-by: Al Viro
    Signed-off-by: Jan Kara

    Al Viro
     
  • Currently UDF doesn't initialize i_generation in any way and thus NFS
    can easily get reallocated inodes from stale file handles. Luckily UDF
    already has a unique object identifier associated with each inode -
    i_unique. Use that for initialization of i_generation.

    Signed-off-by: Jan Kara

    Jan Kara
     

24 Sep, 2013

1 commit

  • A user has reported an oops in udf_statfs() that was caused by
    numOfPartitions entry in LVID structure being corrupted. Fix the problem
    by verifying whether numOfPartitions makes sense at least to the extent
    that LVID fits into a single block as it should.

    Reported-by: Juergen Weigert
    Signed-off-by: Jan Kara

    Jan Kara
     

01 Mar, 2012

1 commit


04 Jan, 2012

1 commit

  • note re mount options: fmask and dmask are explicitly truncated to 12bit,
    UDF_INVALID_MODE just needs to be guaranteed to differ from any such value.
    And umask is used only in &= with umode_t, so we ignore other bits anyway.

    Signed-off-by: Al Viro

    Al Viro
     

07 Jan, 2011

1 commit


10 Aug, 2010

1 commit


24 May, 2010

1 commit

  • Quota on UDF is non-functional at least since 2.6.16 (I'm too lazy to
    do more archeology) because it does not provide .quota_write and .quota_read
    functions and thus quotaon(8) just returns EINVAL. Since nobody complained
    for all those years and quota support is not even in UDF standard just nuke
    it.

    Signed-off-by: Jan Kara

    Jan Kara
     

22 May, 2010

1 commit


05 Mar, 2010

3 commits

  • Get rid of the initialize dquot operation - it is now always called from
    the filesystem and if a filesystem really needs it's own (which none
    currently does) it can just call into it's own routine directly.

    Rename the now static low-level dquot_initialize helper to __dquot_initialize
    and vfs_dq_init to dquot_initialize to have a consistent namespace.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Get rid of the drop dquot operation - it is now always called from
    the filesystem and if a filesystem really needs it's own (which none
    currently does) it can just call into it's own routine directly.

    Rename the now static low-level dquot_drop helper to __dquot_drop
    and vfs_dq_drop to dquot_drop to have a consistent namespace.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Get rid of the alloc_inode and free_inode dquot operations - they are
    always called from the filesystem and if a filesystem really needs
    their own (which none currently does) it can just call into it's
    own routine directly.

    Also get rid of the vfs_dq_alloc/vfs_dq_free wrappers and always
    call the lowlevel dquot_alloc_inode / dqout_free_inode routines
    directly, which now lose the number argument which is always 1.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     

02 Apr, 2009

2 commits

  • We update information in logical volume integrity descriptor after each
    allocation (as LVID contains free space, number of directories and files on
    disk etc.). If the filesystem is on some phase change media, this leads to its
    quick degradation as such media is able to handle only 10000 overwrites or so.
    We solve the problem by writing new information into LVID only on umount,
    remount-ro and sync. This solves the problem at the price of longer media
    inconsistency (previously media became consistent after pdflush flushed dirty
    LVID buffer) but that should be acceptable.

    Report by and patch written in cooperation with
    Rich Coe .

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Signed-off-by: Pekka Enberg
    Signed-off-by: Jan Kara

    Pekka Enberg
     

26 Mar, 2009

1 commit


14 Nov, 2008

1 commit

  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Acked-by: Jan Kara
    Signed-off-by: James Morris

    David Howells
     

19 Aug, 2008

2 commits

  • I case we failed to allocate memory for inode when creating it, we did not
    properly free block already allocated for this inode. Move memory allocation
    before the block allocation which fixes this issue (thanks for the idea go to
    Ingo Oeser ). Also remove a few superfluous
    initializations already done in udf_alloc_inode().

    Reviewed-by: Ingo Oeser
    Signed-off-by: Jan Kara

    Jan Kara
     
  • A memory allocation inside alloc_mutex must not recurse back into the
    filesystem itself because that leads to lock inversion between iprune_mutex and
    alloc_mutex (and thus to deadlocks - see traces below). alloc_mutex is actually
    needed only to update allocation statistics in the superblock so we can drop it
    before we start allocating memory for the inode.

    tar D ffff81015b9c8c90 0 6614 6612
    ffff8100d5a21a20 0000000000000086 0000000000000000 00000000ffff0000
    ffff81015b9c8c90 ffff81015b8f0cd0 ffff81015b9c8ee0 0000000000000000
    0000000000000003 0000000000000000 0000000000000000 0000000000000000
    Call Trace:
    [] __mutex_lock_slowpath+0x64/0x9b
    [] mutex_lock+0xa/0xb
    [] shrink_icache_memory+0x38/0x200
    [] shrink_slab+0xe3/0x15b
    [] try_to_free_pages+0x221/0x30d
    [] isolate_pages_global+0x0/0x31
    [] __alloc_pages_internal+0x252/0x3ab
    [] cache_alloc_refill+0x22e/0x47b
    [] kmem_cache_alloc+0x3b/0x61
    [] cache_alloc_refill+0x2fe/0x47b
    [] __kmalloc+0x76/0x9c
    [] :udf:udf_new_inode+0x202/0x2e2
    [] :udf:udf_create+0x2f/0x16d
    [] :udf:udf_lookup+0xa6/0xad
    ...
    kswapd0 D ffff81015b9d9270 0 125 2
    ffff81015b903c28 0000000000000046 ffffffff8028cbb0 00000000fffffffb
    ffff81015b9d9270 ffff81015b8f0cd0 ffff81015b9d94c0 000000000271b490
    ffffe2000271b458 ffffe2000271b420 ffffe20002728dc8 ffffe20002728d90
    Call Trace:
    [] __set_page_dirty+0xeb/0xf5
    [] get_dirty_limits+0x1d/0x22f
    [] __mutex_lock_slowpath+0x64/0x9b
    [] mutex_lock+0xa/0xb
    [] :udf:udf_bitmap_free_blocks+0x47/0x1eb
    [] :udf:udf_discard_prealloc+0xc6/0x172
    [] :udf:udf_clear_inode+0x1e/0x48
    [] clear_inode+0x6d/0xc4
    [] dispose_list+0x56/0xee
    [] shrink_icache_memory+0x1d0/0x200
    [] shrink_slab+0xe3/0x15b
    [] kswapd+0x346/0x447
    ...

    Reported-by: Tibor Tajti
    Reviewed-by: Ingo Oeser
    Signed-off-by: Jan Kara

    Jan Kara
     

17 Apr, 2008

2 commits

  • replace all:
    little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
    expression_in_cpu_byteorder);
    with:
    leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
    sparse didn't generate any new warning with this patch

    Signed-off-by: Marcin Slusarz

    marcin.slusarz@gmail.com
     
  • There's really no reason to keep udf headers in include/linux as they're
    not used by anything but fs/udf/.

    This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h,
    include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and
    include/linux/udf_fs.h into fs/udf/udfdecl.h.

    The only thing remaining in include/linux/ is a stub of udf_fs_i.h
    defining the four user-visible udf ioctls. It's also moved from
    unifdef-y to headers-y because it can be included unconditionally now.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     

09 Feb, 2008

4 commits

  • cache UDF_I(struct inode *) return values when there are
    at least 2 uses in one function

    Signed-off-by: Marcin Slusarz
    Acked-by: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • Signed-off-by: Marcin Slusarz
    Acked-by: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • fix coding style errors found by checkpatch:
    - assignments in if conditions
    - braces {} around single statement blocks
    - no spaces after commas
    - printks without KERN_*
    - lines longer than 80 characters
    - spaces between "type *" and variable name

    before: 192 errors, 561 warnings, 8987 lines checked
    after: 1 errors, 38 warnings, 9468 lines checked

    Signed-off-by: Marcin Slusarz
    Cc: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • remove macros:
    - UDF_SB_PARTMAPS
    - UDF_SB_PARTTYPE
    - UDF_SB_PARTROOT
    - UDF_SB_PARTLEN
    - UDF_SB_PARTVSN
    - UDF_SB_PARTNUM
    - UDF_SB_TYPESPAR
    - UDF_SB_TYPEVIRT
    - UDF_SB_PARTFUNC
    - UDF_SB_PARTFLAGS
    - UDF_SB_VOLIDENT
    - UDF_SB_NUMPARTS
    - UDF_SB_PARTITION
    - UDF_SB_SESSION
    - UDF_SB_ANCHOR
    - UDF_SB_LASTBLOCK
    - UDF_SB_LVIDBH
    - UDF_SB_LVID
    - UDF_SB_UMASK
    - UDF_SB_GID
    - UDF_SB_UID
    - UDF_SB_RECORDTIME
    - UDF_SB_SERIALNUM
    - UDF_SB_UDFREV
    - UDF_SB_FLAGS
    - UDF_SB_VAT
    - UDF_UPDATE_UDFREV
    - UDF_SB_FREE
    and open code them

    convert UDF_SB_LVIDIU macro to udf_sb_lvidiu function

    rename some struct udf_sb_info fields:
    - s_volident to s_volume_ident
    - s_lastblock to s_last_block
    - s_lvidbh to s_lvid_bh
    - s_recordtime to s_record_time
    - s_serialnum to s_serial_number;
    - s_vat to s_vat_inode;

    Signed-off-by: Marcin Slusarz
    Cc: Ben Fennema
    Cc: Jan Kara
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     

22 Jul, 2007

1 commit


20 Jul, 2007

1 commit


17 Jul, 2007

1 commit


27 Sep, 2006

2 commits


06 Aug, 2006

1 commit

  • I saw an oops down this path when trying to create a new file on a UDF
    filesystem which was internally marked as readonly, but mounted rw:

    udf_create
    udf_new_inode
    new_inode
    alloc_inode
    udf_alloc_inode
    udf_new_block
    returns EIO due to readonlyness
    iput (on error)
    udf_put_inode
    udf_discard_prealloc
    udf_next_aext
    udf_current_aext
    udf_get_fileshortad
    OOPS

    the udf_discard_prealloc() path was examining uninitialized fields of the
    udf inode.

    udf_discard_prealloc() already has this code to short-circuit the discard
    path if no extents are preallocated:

    if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
    inode->i_size == UDF_I_LENEXTENTS(inode))
    {
    return;
    }

    so if we initialize UDF_I_LENEXTENTS(inode) = 0 earlier in udf_new_inode,
    we won't try to free the (not) preallocated blocks, since this will match
    the i_size = 0 set when the inode was initialized.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     

23 Mar, 2006

1 commit

  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

03 Jan, 2006

1 commit