get_lock_alloc_layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Benny

Why do we have the complexity of waiting on a bit lock for allocating a layout? Why can't we use the normal form:

take the i_lock
lookup layout
if (layout == NULL) {
        give up i_lock
        allocate and init new layout
               return NULL if allocation fails
        take the i_lock
        lookup layout
        if (layout == NULL)
                set new layout for return
        else
                set found layout for return
}
give up i_lock
if new was allocated and not used
          free the new layout
return layout


-->Andy

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux